MCPcopy Create free account
hub / github.com/ChaiScript/ChaiScript / applyCommandLine

Method applyCommandLine

unittests/catch.hpp:9225–9246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9223 }
9224
9225 int Session::applyCommandLine( int argc, char const * const * argv ) {
9226 if( m_startupExceptions )
9227 return 1;
9228
9229 auto result = m_cli.parse( clara::Args( argc, argv ) );
9230 if( !result ) {
9231 Catch::cerr()
9232 << Colour( Colour::Red )
9233 << "\nError(s) in input:\n"
9234 << Column( result.errorMessage() ).indent( 2 )
9235 << "\n\n";
9236 Catch::cerr() << "Run with -? for usage\n" << std::endl;
9237 return MaxExitCode;
9238 }
9239
9240 if( m_configData.showHelp )
9241 showHelp();
9242 if( m_configData.libIdentify )
9243 libIdentify();
9244 m_config.reset();
9245 return 0;
9246 }
9247
9248 void Session::useConfigData( ConfigData const& configData ) {
9249 m_configData = configData;

Callers

nothing calls this directly

Calls 7

ArgsClass · 0.85
ColourClass · 0.85
ColumnClass · 0.85
errorMessageMethod · 0.80
parseMethod · 0.45
indentMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected