parses an option and returns the string after the '=' character
| 6483 | |
| 6484 | // parses an option and returns the string after the '=' character |
| 6485 | bool parseOption(int argc, const char* const* argv, const char* pattern, String* value = nullptr, |
| 6486 | const String& defaultVal = String()) { |
| 6487 | if(value) |
| 6488 | *value = defaultVal; |
| 6489 | #ifndef DOCTEST_CONFIG_NO_UNPREFIXED_OPTIONS |
| 6490 | // offset (normally 3 for "dt-") to skip prefix |
| 6491 | if(parseOptionImpl(argc, argv, pattern + strlen(DOCTEST_CONFIG_OPTIONS_PREFIX), value)) |
| 6492 | return true; |
| 6493 | #endif // DOCTEST_CONFIG_NO_UNPREFIXED_OPTIONS |
| 6494 | return parseOptionImpl(argc, argv, pattern, value); |
| 6495 | } |
| 6496 | |
| 6497 | // locates a flag on the command line |
| 6498 | bool parseFlag(int argc, const char* const* argv, const char* pattern) { |
no test coverage detected