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-Perkins
2025-01-14 00:44:41 +00:00
committed by GitHub
co-authored by Richard Smith
parent 2faff26f92
commit a3e66d6116
2 changed files with 6 additions and 1 deletions
+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 "