| 372 | } |
| 373 | |
| 374 | void |
| 375 | help(std::ostream& ostr, |
| 376 | parameters_store const& parameters, |
| 377 | cstring param_name, |
| 378 | bool use_color = true) |
| 379 | { |
| 380 | namespace utils = unit_test::utils; |
| 381 | namespace ut_detail = unit_test::ut_detail; |
| 382 | |
| 383 | if( !param_name.is_empty() ) { |
| 384 | basic_param_ptr param = locate_parameter( m_param_trie[help_prefix], param_name, "" ).second; |
| 385 | param->help( ostr, m_negation_prefix, use_color); |
| 386 | return; |
| 387 | } |
| 388 | |
| 389 | usage(ostr, cstring(), use_color); |
| 390 | |
| 391 | ostr << "\n\n"; |
| 392 | { |
| 393 | BOOST_TEST_SCOPE_SETCOLOR( use_color, ostr, term_attr::BRIGHT, term_color::ORIGINAL ); |
| 394 | ostr << " Command line flags:\n"; |
| 395 | } |
| 396 | runtime::commandline_pretty_print( |
| 397 | ostr, |
| 398 | " ", |
| 399 | "The command line flags of Boost.Test are listed below. " |
| 400 | "All parameters are optional. You can specify parameter value either " |
| 401 | "as a command line argument or as a value of its corresponding environment " |
| 402 | "variable. If a flag is specified as a command line argument and an environment variable " |
| 403 | "at the same time, the command line takes precedence. " |
| 404 | "The command line argument " |
| 405 | "support name guessing, and works with shorter names as long as those are not ambiguous." |
| 406 | ); |
| 407 | |
| 408 | if( !m_end_of_param_indicator.empty() ) { |
| 409 | ostr << "\n\n All the arguments after the '"; |
| 410 | { |
| 411 | BOOST_TEST_SCOPE_SETCOLOR( use_color, ostr, term_attr::BRIGHT, term_color::YELLOW ); |
| 412 | ostr << m_end_of_param_indicator; |
| 413 | } |
| 414 | ostr << "' are ignored by Boost.Test."; |
| 415 | } |
| 416 | |
| 417 | |
| 418 | { |
| 419 | BOOST_TEST_SCOPE_SETCOLOR( use_color, ostr, term_attr::BRIGHT, term_color::ORIGINAL ); |
| 420 | ostr << "\n\n Environment variables:\n"; |
| 421 | } |
| 422 | runtime::commandline_pretty_print( |
| 423 | ostr, |
| 424 | " ", |
| 425 | "Every argument listed below may also be set by a corresponding environment" |
| 426 | "variable. For an argument '--argument_x=<value>', the corresponding " |
| 427 | "environment variable is 'BOOST_TEST_ARGUMENT_X=value" |
| 428 | ); |
| 429 | |
| 430 | |
| 431 | |