Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Commit d01083a

Browse files
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 git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@375477 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent c302ff3 commit d01083a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -805,13 +805,13 @@ main = foo
805805

806806
PythonScript foo(script);
807807

808-
EXPECT_THAT_EXPECTED(foo(),
809-
llvm::Failed<PythonException>(testing::Property(
810-
&PythonException::ReadBacktrace,
811-
testing::ContainsRegex("line 3, in foo..*"
812-
"line 5, in bar.*"
813-
"line 7, in baz.*"
814-
"ZeroDivisionError"))));
808+
EXPECT_THAT_EXPECTED(
809+
foo(), llvm::Failed<PythonException>(testing::Property(
810+
&PythonException::ReadBacktrace,
811+
testing::AllOf(testing::ContainsRegex("line 3, in foo"),
812+
testing::ContainsRegex("line 5, in bar"),
813+
testing::ContainsRegex("line 7, in baz"),
814+
testing::ContainsRegex("ZeroDivisionError")))));
815815

816816
static const char script2[] = R"(
817817
class MyError(Exception):

0 commit comments

Comments
 (0)