mirror of
https://github.com/monero-project/monero.git
synced 2025-12-22 23:26:44 -08:00
core_tests: add --filter to select which tests to run
This commit is contained in:
@@ -919,4 +919,23 @@ std::string get_nix_version_display_string()
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
std::string glob_to_regex(const std::string &val)
|
||||
{
|
||||
std::string newval;
|
||||
|
||||
bool escape = false;
|
||||
for (char c: val)
|
||||
{
|
||||
if (c == '*')
|
||||
newval += escape ? "*" : ".*";
|
||||
else if (c == '?')
|
||||
newval += escape ? "?" : ".";
|
||||
else if (c == '\\')
|
||||
newval += '\\', escape = !escape;
|
||||
else
|
||||
newval += c;
|
||||
}
|
||||
return newval;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user