Fix CaptureStderrRAII for Windows
This commit is contained in:
parent
916632279b
commit
9b990b4fd1
@ -5,6 +5,7 @@
|
||||
#include <cpp-utils/macros.h>
|
||||
#include <iostream>
|
||||
#include <gmock/gmock.h>
|
||||
#include <regex>
|
||||
|
||||
namespace cpputils {
|
||||
|
||||
@ -27,7 +28,9 @@ public:
|
||||
}
|
||||
|
||||
void EXPECT_MATCHES(const std::string ®ex) {
|
||||
EXPECT_THAT(get_stderr(), testing::MatchesRegex(".*" + regex + ".*"));
|
||||
// TODO For some reason this doesn't work on MSVC
|
||||
// EXPECT_THAT(get_stderr(), testing::MatchesRegex(".*" + regex + ".*"));
|
||||
EXPECT_TRUE(std::regex_search(get_stderr(), std::regex(regex, std::regex::basic)));
|
||||
}
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user