Skip to content

Commit

Permalink
[lldb][test] TestFileHandle: flush the output after write
Browse files Browse the repository at this point in the history
  • Loading branch information
tkrasnukha committed Mar 5, 2020
1 parent cb06571 commit 7a11cc0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lldb/test/API/python_api/file_handle/TestFileHandle.py
Expand Up @@ -129,6 +129,7 @@ def test_legacy_file_out_script(self):
# even with collect_result=True.
self.handleCmd('script 1+1')
self.dbg.GetOutputFileHandle().write('FOO\n')
self.dbg.GetOutputFileHandle().flush()
with open(self.out_filename, 'r') as f:
self.assertEqual(readStrippedLines(f), ['2', 'FOO'])

Expand Down Expand Up @@ -246,6 +247,7 @@ def test_fileno_out(self):
self.assertTrue(status.Success())
self.handleCmd('script 1+2')
self.dbg.GetOutputFile().Write(b'quux')
self.dbg.GetOutputFile().Flush()

with open(self.out_filename, 'r') as f:
self.assertEqual(readStrippedLines(f), ['3', 'quux'])
Expand Down

0 comments on commit 7a11cc0

Please sign in to comment.