summaryrefslogtreecommitdiffstats
path: root/lldb/test/breakpoint_command/TestBreakpointCommand.py
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/test/breakpoint_command/TestBreakpointCommand.py')
-rw-r--r--lldb/test/breakpoint_command/TestBreakpointCommand.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/lldb/test/breakpoint_command/TestBreakpointCommand.py b/lldb/test/breakpoint_command/TestBreakpointCommand.py
index d9e2ec67a80..f3a35807ebf 100644
--- a/lldb/test/breakpoint_command/TestBreakpointCommand.py
+++ b/lldb/test/breakpoint_command/TestBreakpointCommand.py
@@ -65,10 +65,11 @@ class BreakpointCommandTestCase(TestBase):
# Check that the file 'output.txt' exists and contains the string "lldb".
# Read the output file produced by running the program.
- output = open('output.txt', 'r').read()
+ with open('output.txt', 'r') as f:
+ output = f.read()
- self.assertTrue(output.startswith("lldb"),
- "File 'output.txt' and the content matches")
+ self.expect(output, "File 'output.txt' and the content matches", exe=False,
+ startstr = "lldb")
# Finish the program.
self.runCmd("process continue")
OpenPOWER on IntegriCloud