parses an option and returns the string after the '=' character
| 3393 | |
| 3394 | // parses an option and returns the string after the '=' character |
| 3395 | bool parseOption(int argc, const char* const* argv, const char* pattern, String* value = nullptr, |
| 3396 | const String& defaultVal = String()) { |
| 3397 | if(value) |
| 3398 | *value = defaultVal; |
| 3399 | #ifndef DOCTEST_CONFIG_NO_UNPREFIXED_OPTIONS |
| 3400 | // offset (normally 3 for "dt-") to skip prefix |
| 3401 | if(parseOptionImpl(argc, argv, pattern + strlen(DOCTEST_CONFIG_OPTIONS_PREFIX), value)) |
| 3402 | return true; |
| 3403 | #endif // DOCTEST_CONFIG_NO_UNPREFIXED_OPTIONS |
| 3404 | return parseOptionImpl(argc, argv, pattern, value); |
| 3405 | } |
| 3406 | |
| 3407 | // locates a flag on the command line |
| 3408 | bool parseFlag(int argc, const char* const* argv, const char* pattern) { |
no test coverage detected