| 12 | using namespace std::literals; |
| 13 | |
| 14 | TEST(SubCommands, Simple1) { |
| 15 | SubCommand S1(Description("s1"sv)); |
| 16 | SubCommand S2(Description("s2"sv)); |
| 17 | ArgumentParser Parser; |
| 18 | Parser.begin_subcommand(S1, "s1"sv) |
| 19 | .end_subcommand() |
| 20 | .begin_subcommand(S2, "s2"sv) |
| 21 | .end_subcommand(); |
| 22 | std::array Args = {"test"}; |
| 23 | EXPECT_TRUE(Parser.parse(stdout, static_cast<int>(Args.size()), Args.data())); |
| 24 | EXPECT_FALSE(S1.is_selected()); |
| 25 | EXPECT_FALSE(S2.is_selected()); |
| 26 | } |
| 27 | |
| 28 | TEST(SubCommands, Simple2) { |
| 29 | SubCommand S1(Description("s1"sv)); |
nothing calls this directly
no test coverage detected