Commit 3a2c5112a35ae51021bc6e70d9b1caa19bace7ff
1 parent
f49447c5
Adding missing tests from #185, should hit full coverage again
Showing
2 changed files
with
15 additions
and
1 deletions
tests/CreationTest.cpp
| ... | ... | @@ -48,6 +48,20 @@ TEST_F(TApp, AddingExistingWithCaseAfter2) { |
| 48 | 48 | EXPECT_THROW(cat->ignore_case(), CLI::OptionAlreadyAdded); |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | +TEST_F(TApp, AddingExistingWithUnderscoreAfter) { | |
| 52 | + auto count = app.add_flag("--underscore"); | |
| 53 | + app.add_flag("--under_score"); | |
| 54 | + | |
| 55 | + EXPECT_THROW(count->ignore_underscore(), CLI::OptionAlreadyAdded); | |
| 56 | +} | |
| 57 | + | |
| 58 | +TEST_F(TApp, AddingExistingWithUnderscoreAfter2) { | |
| 59 | + auto count = app.add_flag("--under_score"); | |
| 60 | + app.add_flag("--underscore"); | |
| 61 | + | |
| 62 | + EXPECT_THROW(count->ignore_underscore(), CLI::OptionAlreadyAdded); | |
| 63 | +} | |
| 64 | + | |
| 51 | 65 | TEST_F(TApp, AddingMultipleInfPositionals) { |
| 52 | 66 | std::vector<std::string> one, two; |
| 53 | 67 | app.add_option("one", one); | ... | ... |