Updated embedded Clara to 0.0.2.3
- has all new, more robust, token parsing. - eliminates issue with unreachable code - allows use of forward slashes to introduce short args on Windows
This commit is contained in:
parent
6f3bc629be
commit
1c47fe023a
3 changed files with 96 additions and 79 deletions
|
@ -131,10 +131,10 @@ namespace Catch {
|
|||
Catch::cout() << "For more detail usage please see the project docs\n" << std::endl;
|
||||
}
|
||||
|
||||
int applyCommandLine( int argc, char const* argv[], OnUnusedOptions::DoWhat unusedOptionBehaviour = OnUnusedOptions::Fail ) {
|
||||
int applyCommandLine( int argc, char const* const* const argv, OnUnusedOptions::DoWhat unusedOptionBehaviour = OnUnusedOptions::Fail ) {
|
||||
try {
|
||||
m_cli.setThrowOnUnrecognisedTokens( unusedOptionBehaviour == OnUnusedOptions::Fail );
|
||||
m_unusedTokens = m_cli.parseInto( argc, argv, m_configData );
|
||||
m_unusedTokens = m_cli.parseInto( Clara::argsToVector( argc, argv ), m_configData );
|
||||
if( m_configData.showHelp )
|
||||
showHelp( m_configData.processName );
|
||||
m_config.reset();
|
||||
|
@ -158,16 +158,13 @@ namespace Catch {
|
|||
m_config.reset();
|
||||
}
|
||||
|
||||
int run( int argc, char const* argv[] ) {
|
||||
int run( int argc, char const* const* const argv ) {
|
||||
|
||||
int returnCode = applyCommandLine( argc, argv );
|
||||
if( returnCode == 0 )
|
||||
returnCode = run();
|
||||
return returnCode;
|
||||
}
|
||||
int run( int argc, char* argv[] ) {
|
||||
return run( argc, const_cast<char const**>( argv ) );
|
||||
}
|
||||
|
||||
int run() {
|
||||
if( m_configData.showHelp )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue