summaryrefslogtreecommitdiffstats
path: root/lldb/test/abbreviation_tests/TestAbbreviations.py
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/test/abbreviation_tests/TestAbbreviations.py')
-rw-r--r--lldb/test/abbreviation_tests/TestAbbreviations.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/lldb/test/abbreviation_tests/TestAbbreviations.py b/lldb/test/abbreviation_tests/TestAbbreviations.py
index da58ee05b5e..95cbb1c82b4 100644
--- a/lldb/test/abbreviation_tests/TestAbbreviations.py
+++ b/lldb/test/abbreviation_tests/TestAbbreviations.py
@@ -57,6 +57,15 @@ class AbbreviationsTestCase(TestBase):
self.expect("set sh prompt",
startstr = 'prompt (string) = "(lldb) "')
+ # We don't want to display the stdout if not in TraceOn() mode.
+ if not self.TraceOn():
+ old_stdout = sys.stdout
+ session = StringIO.StringIO()
+ sys.stdout = session
+ def restore_stdout():
+ sys.stdout = old_stdout
+ self.addTearDownHook(restore_stdout)
+
self.runCmd (r'''sc print "\n\n\tHello!\n"''')
OpenPOWER on IntegriCloud