aboutsummaryrefslogtreecommitdiff
path: root/lldb/test/Shell/ScriptInterpreter/Python
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/test/Shell/ScriptInterpreter/Python')
-rw-r--r--lldb/test/Shell/ScriptInterpreter/Python/io.test15
1 files changed, 15 insertions, 0 deletions
diff --git a/lldb/test/Shell/ScriptInterpreter/Python/io.test b/lldb/test/Shell/ScriptInterpreter/Python/io.test
new file mode 100644
index 0000000..f4303d4
--- /dev/null
+++ b/lldb/test/Shell/ScriptInterpreter/Python/io.test
@@ -0,0 +1,15 @@
+# UNSUPPORTED: system-windows
+
+# RUN: rm -rf %t.stdout %t.stderr
+# RUN: cat %s | %lldb --script-language python > %t.stdout 2> %t.stderr
+# RUN: cat %t.stdout | FileCheck %s --check-prefix STDOUT
+# RUN: cat %t.stderr | FileCheck %s --check-prefix STDERR
+script
+import sys
+variable = 250 + 5
+print(variable)
+print("wrote to", "stderr", file=sys.stderr)
+quit
+
+# STDOUT: 255
+# STDERR: wrote to stderr