Merge "utils.h: quote regex match failure messages." into main
This commit is contained in:
commit
e852abd1fc
1 changed files with 2 additions and 1 deletions
|
@ -38,6 +38,7 @@
|
|||
#endif
|
||||
|
||||
#include <atomic>
|
||||
#include <iomanip>
|
||||
#include <string>
|
||||
#include <regex>
|
||||
|
||||
|
@ -253,7 +254,7 @@ class ExecTestHelper {
|
|||
AssertChildExited(pid, expected_exit_status, &error_msg);
|
||||
if (expected_output_regex != nullptr) {
|
||||
if (!std::regex_search(output_, std::regex(expected_output_regex))) {
|
||||
FAIL() << "regex " << expected_output_regex << " didn't match " << output_;
|
||||
FAIL() << "regex " << std::quoted(expected_output_regex) << " didn't match " << std::quoted(output_);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue