aboutsummaryrefslogtreecommitdiff
path: root/tests/framework/command_line
diff options
context:
space:
mode:
Diffstat (limited to 'tests/framework/command_line')
-rw-r--r--tests/framework/command_line/CommandLineParser.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/framework/command_line/CommandLineParser.cpp b/tests/framework/command_line/CommandLineParser.cpp
index 228b18d842..11eb1f3a4d 100644
--- a/tests/framework/command_line/CommandLineParser.cpp
+++ b/tests/framework/command_line/CommandLineParser.cpp
@@ -56,7 +56,11 @@ void CommandLineParser::parse(int argc, char **argv)
for(int i = 1; i < argc; ++i)
{
- const std::string option{ argv[i] };
+ std::string mixed_case_opt{ argv[i] };
+ int equal_sign = mixed_case_opt.find('=');
+ int pos = (equal_sign == -1) ? strlen(argv[i]) : equal_sign;
+
+ const std::string option = tolower(mixed_case_opt.substr(0, pos)) + mixed_case_opt.substr(pos);
std::smatch option_matches;
if(std::regex_match(option, option_matches, option_regex))