Fix short option error (#4796)

"unsigned char" prints as an integer, not a char

---------

Co-authored-by: Richard Smith <richard@metafoo.co.uk>
This commit is contained in:
Jon Ross-PerkinsandRichard Smith authored and GitHub committed 2025-01-14 00:44:41 +00:00
1 parent 2faff26f92
commit a3e66d6116
2 files changed
+6 -1

No files matched your search

+4
View File
@@ -188,6 +188,10 @@ TEST(ArgParserTest, ShortArgs) {
EXPECT_THAT(integer_option, Eq(123));
TestRawOstream os;
EXPECT_THAT(parse({"-v"}, os), IsError(StrEq("unknown short option `-v`")));
EXPECT_THAT(parse({"-xvx"}, os), IsError(StrEq("unknown short option `-v`")));
EXPECT_THAT(
parse({"-xzf"}, os),
IsError(StrEq("option `-z` (short for `--option2`) requires a value to "