mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 20:52:37 +01:00
Added -- as command line argument terminator.
This commit is contained in:
@@ -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') );
|
||||
|
||||
Reference in New Issue
Block a user