TEST_CASE( "Opt value can start with a dash" ) {
std::string name;
bool showHelp = false;
auto parser
= Help( showHelp )
| Opt( name, "name" )
["-n"]["--name"]
( "the name to use" );
auto result = parser.parse( Args{ "TestApp", "-n", "-lfoobar" } );
CHECK( result );
REQUIRE( name == "-lfoobar" );
}
I have a program that receives compiler flags in arguments so a leading dash is common.
Also related to this issue:
if I have an option that takes an integer, it can no longer be negative, since Clara can't parse things that start this a minus.
This test case fails:
I have a program that receives compiler flags in arguments so a leading dash is common.