aboutsummaryrefslogtreecommitdiff
path: root/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
diff options
context:
space:
mode:
authorLawrence D'Anna <lawrence_danna@apple.com>2019-10-22 04:00:37 +0000
committerLawrence D'Anna <lawrence_danna@apple.com>2019-10-22 04:00:37 +0000
commitd602e0d0cab270761553c79d2e42b8ac6b756157 (patch)
tree3f5a6df352fa59f1ad063cce1baf7ff2cd1ee127 /lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
parent04edd1893c2d0f35880fd5f81e78dc23979df0b9 (diff)
downloadllvm-d602e0d0cab270761553c79d2e42b8ac6b756157.zip
llvm-d602e0d0cab270761553c79d2e42b8ac6b756157.tar.gz
llvm-d602e0d0cab270761553c79d2e42b8ac6b756157.tar.bz2
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
Diffstat (limited to 'lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp')
-rw-r--r--lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp b/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
index b676b42..7481482 100644
--- a/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
+++ b/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
@@ -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):