Skip to content

Commit

Permalink
Extend unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
kkarbowiak committed Apr 11, 2020
1 parent c8d7548 commit 70d7073
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/unittest/test_ArgumentParser_HelpMessage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -547,5 +547,12 @@ TEST_CASE("Help string starts on 25th column...")

CHECK(parser.format_help() == "usage: prog abcdefghijklmnopqrstu\n\npositional arguments:\n abcdefghijklmnopqrstu\n help");
}

SUBCASE("...optional arguments with length of 21 characters or more")
{
parser.add_argument("--abcdefghijklmnopq").metavar("A").help("help");

CHECK(parser.format_help() == "usage: prog [--abcdefghijklmnopq A]\n\noptional arguments:\n --abcdefghijklmnopq A\n help");
}
}
}

0 comments on commit 70d7073

Please sign in to comment.