mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-12-06 02:11:52 +00:00
fix PythonDataObjectsTest.TestExceptions on windows
Looks like on windows googlemock regexes treat newlines differently from on darwin. This patch fixes the regex in this test so it will work on both. Fixes: https://reviews.llvm.org/D69214 llvm-svn: 375477
This commit is contained in:
1 parent
04edd1893c
commit
d602e0d0ca
1 file changed
+7
-7
@@ -805,13 +805,13 @@ main = foo
|
||||
|
||||
PythonScript foo(script);
|
||||
|
||||
EXPECT_THAT_EXPECTED(foo(),
|
||||
llvm::Failed<PythonException>(testing::Property(
|
||||
&PythonException::ReadBacktrace,
|
||||
testing::ContainsRegex("line 3, in foo..*"
|
||||
"line 5, in bar.*"
|
||||
"line 7, in baz.*"
|
||||
"ZeroDivisionError"))));
|
||||
EXPECT_THAT_EXPECTED(
|
||||
foo(), llvm::Failed<PythonException>(testing::Property(
|
||||
&PythonException::ReadBacktrace,
|
||||
testing::AllOf(testing::ContainsRegex("line 3, in foo"),
|
||||
testing::ContainsRegex("line 5, in bar"),
|
||||
testing::ContainsRegex("line 7, in baz"),
|
||||
testing::ContainsRegex("ZeroDivisionError")))));
|
||||
|
||||
static const char script2[] = R"(
|
||||
class MyError(Exception):
|
||||
|
||||
Reference in new issue
Block a user