1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-05-02 13:43:52 +00:00

Adding missing tests from #185, should hit full coverage again

This commit is contained in:
Henry Fredrick Schreiner 2019-01-03 13:12:48 +01:00
parent f49447c590
commit 3a2c5112a3
2 changed files with 15 additions and 1 deletions

2
extern/json vendored

@ -1 +1 @@
Subproject commit f1768a540a7b7c5cc30cdcd6be9e9ef91083719b
Subproject commit db53bdac1926d1baebcb459b685dcd2e4608c355

View File

@ -48,6 +48,20 @@ TEST_F(TApp, AddingExistingWithCaseAfter2) {
EXPECT_THROW(cat->ignore_case(), CLI::OptionAlreadyAdded);
}
TEST_F(TApp, AddingExistingWithUnderscoreAfter) {
auto count = app.add_flag("--underscore");
app.add_flag("--under_score");
EXPECT_THROW(count->ignore_underscore(), CLI::OptionAlreadyAdded);
}
TEST_F(TApp, AddingExistingWithUnderscoreAfter2) {
auto count = app.add_flag("--under_score");
app.add_flag("--underscore");
EXPECT_THROW(count->ignore_underscore(), CLI::OptionAlreadyAdded);
}
TEST_F(TApp, AddingMultipleInfPositionals) {
std::vector<std::string> one, two;
app.add_option("one", one);