|
|
@@ -15,12 +15,19 @@ TEST_CASE("commandLine", "")
|
|
|
"--long",
|
|
|
"--platform",
|
|
|
"x",
|
|
|
+ "--foo",
|
|
|
+ "--", // it should not parse arguments after argument terminator
|
|
|
+ "--bar",
|
|
|
};
|
|
|
|
|
|
bx::CommandLine cmdLine(BX_COUNTOF(args), args);
|
|
|
|
|
|
- REQUIRE(cmdLine.hasArg("long") );
|
|
|
- REQUIRE(cmdLine.hasArg('s') );
|
|
|
+ REQUIRE( cmdLine.hasArg("long") );
|
|
|
+ REQUIRE( cmdLine.hasArg('s') );
|
|
|
+
|
|
|
+ // test argument terminator
|
|
|
+ REQUIRE( cmdLine.hasArg("foo") );
|
|
|
+ REQUIRE(!cmdLine.hasArg("bar") );
|
|
|
|
|
|
// non-existing argument
|
|
|
REQUIRE(!cmdLine.hasArg('x') );
|