| 2984 | } |
| 2985 | |
| 2986 | void printHelp() { |
| 2987 | int sizePrefixDisplay = static_cast<int>(strlen(DOCTEST_OPTIONS_PREFIX_DISPLAY)); |
| 2988 | printVersion(); |
| 2989 | // clang-format off |
| 2990 | s << Color::Cyan << "[doctest]\n" << Color::None; |
| 2991 | s << Color::Cyan << "[doctest] " << Color::None; |
| 2992 | s << "boolean values: \"1/on/yes/true\" or \"0/off/no/false\"\n"; |
| 2993 | s << Color::Cyan << "[doctest] " << Color::None; |
| 2994 | s << "filter values: \"str1,str2,str3\" (comma separated strings)\n"; |
| 2995 | s << Color::Cyan << "[doctest]\n" << Color::None; |
| 2996 | s << Color::Cyan << "[doctest] " << Color::None; |
| 2997 | s << "filters use wildcards for matching strings\n"; |
| 2998 | s << Color::Cyan << "[doctest] " << Color::None; |
| 2999 | s << "something passes a filter if any of the strings in a filter matches\n"; |
| 3000 | #ifndef DOCTEST_CONFIG_NO_UNPREFIXED_OPTIONS |
| 3001 | s << Color::Cyan << "[doctest]\n" << Color::None; |
| 3002 | s << Color::Cyan << "[doctest] " << Color::None; |
| 3003 | s << "ALL FLAGS, OPTIONS AND FILTERS ALSO AVAILABLE WITH A \"" DOCTEST_CONFIG_OPTIONS_PREFIX "\" PREFIX!!!\n"; |
| 3004 | #endif |
| 3005 | s << Color::Cyan << "[doctest]\n" << Color::None; |
| 3006 | s << Color::Cyan << "[doctest] " << Color::None; |
| 3007 | s << "Query flags - the program quits after them. Available:\n\n"; |
| 3008 | s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "?, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "help, -" DOCTEST_OPTIONS_PREFIX_DISPLAY "h " |
| 3009 | << Whitespace(sizePrefixDisplay*0) << "prints this message\n"; |
| 3010 | s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "v, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "version " |
| 3011 | << Whitespace(sizePrefixDisplay*1) << "prints the version\n"; |
| 3012 | s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "c, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "count " |
| 3013 | << Whitespace(sizePrefixDisplay*1) << "prints the number of matching tests\n"; |
| 3014 | s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "ltc, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "list-test-cases " |
| 3015 | << Whitespace(sizePrefixDisplay*1) << "lists all matching tests by name\n"; |
| 3016 | s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "lts, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "list-test-suites " |
| 3017 | << Whitespace(sizePrefixDisplay*1) << "lists all matching test suites\n"; |
| 3018 | s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "lr, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "list-reporters " |
| 3019 | << Whitespace(sizePrefixDisplay*1) << "lists all registered reporters\n\n"; |
| 3020 | // ================================================================================== << 79 |
| 3021 | s << Color::Cyan << "[doctest] " << Color::None; |
| 3022 | s << "The available <int>/<string> options/filters are:\n\n"; |
| 3023 | s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "tc, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "test-case=<filters> " |
| 3024 | << Whitespace(sizePrefixDisplay*1) << "filters tests by their name\n"; |
| 3025 | s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "tce, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "test-case-exclude=<filters> " |
| 3026 | << Whitespace(sizePrefixDisplay*1) << "filters OUT tests by their name\n"; |
| 3027 | s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "sf, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "source-file=<filters> " |
| 3028 | << Whitespace(sizePrefixDisplay*1) << "filters tests by their file\n"; |
| 3029 | s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "sfe, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "source-file-exclude=<filters> " |
| 3030 | << Whitespace(sizePrefixDisplay*1) << "filters OUT tests by their file\n"; |
| 3031 | s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "ts, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "test-suite=<filters> " |
| 3032 | << Whitespace(sizePrefixDisplay*1) << "filters tests by their test suite\n"; |
| 3033 | s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "tse, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "test-suite-exclude=<filters> " |
| 3034 | << Whitespace(sizePrefixDisplay*1) << "filters OUT tests by their test suite\n"; |
| 3035 | s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "sc, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "subcase=<filters> " |
| 3036 | << Whitespace(sizePrefixDisplay*1) << "filters subcases by their name\n"; |
| 3037 | s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "sce, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "subcase-exclude=<filters> " |
| 3038 | << Whitespace(sizePrefixDisplay*1) << "filters OUT subcases by their name\n"; |
| 3039 | s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "r, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "reporters=<filters> " |
| 3040 | << Whitespace(sizePrefixDisplay*1) << "reporters to use (console is default)\n"; |
| 3041 | s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "o, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "out=<string> " |
| 3042 | << Whitespace(sizePrefixDisplay*1) << "output filename\n"; |
| 3043 | s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "ob, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "order-by=<string> " |