mirror of
https://github.com/monero-project/monero.git
synced 2025-06-21 09:04:08 -04:00
Merge pull request #4110
639ca3b
core_tests: add --filter to select which tests to run (moneromooo-monero)
This commit is contained in:
commit
ff01c3ade4
5 changed files with 29 additions and 20 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -231,4 +231,6 @@ namespace tools
|
|||
bool is_hdd(const char *path);
|
||||
|
||||
boost::optional<std::pair<uint32_t, uint32_t>> parse_subaddress_lookahead(const std::string& str);
|
||||
|
||||
std::string glob_to_regex(const std::string &val);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue