mirror of
https://github.com/CLIUtils/CLI11.git
synced 2026-01-19 04:52:08 +00:00
@@ -582,6 +582,7 @@ CLI11_INLINE void App::clear() {
|
||||
|
||||
missing_.clear();
|
||||
parsed_subcommands_.clear();
|
||||
parse_order_.clear();
|
||||
for(const Option_p &opt : options_) {
|
||||
opt->clear();
|
||||
}
|
||||
|
||||
@@ -2016,6 +2016,8 @@ TEST_CASE_METHOD(TApp, "OriginalOrder", "[app]") {
|
||||
CHECK(std::vector<int>({2}) == st2);
|
||||
|
||||
CHECK(std::vector<CLI::Option *>({op1, op2, op1, op1}) == app.parse_order());
|
||||
app.clear();
|
||||
CHECK(app.parse_order().empty());
|
||||
}
|
||||
|
||||
TEST_CASE_METHOD(TApp, "NeedsFlags", "[app]") {
|
||||
|
||||
Reference in New Issue
Block a user