diff --git a/test/options.cpp b/test/options.cpp index afd7292..387f956 100644 --- a/test/options.cpp +++ b/test/options.cpp @@ -423,9 +423,12 @@ TEST_CASE("Booleans", "[boolean]") { ("bool", "A Boolean", cxxopts::value()) ("debug", "Debugging", cxxopts::value()) ("timing", "Timing", cxxopts::value()) + ("others", "Other arguments", cxxopts::value>()) ; - Argv av({"booleans", "--bool=false", "--debug", "true", "--timing"}); + options.parse_positional("others"); + + Argv av({"booleans", "--bool=false", "--debug", "true", "--timing", "extra"}); char** argv = av.argv(); auto argc = av.argc(); @@ -439,4 +442,6 @@ TEST_CASE("Booleans", "[boolean]") { CHECK(result["bool"].as() == false); CHECK(result["debug"].as() == true); CHECK(result["timing"].as() == true); + + REQUIRE(result.count("others") == 1); }