llvm/lldb/test/Shell/ScriptInterpreter/Lua/io.test

# UNSUPPORTED: lldb-repro
#
# RUN: rm -rf %t.stderr %t.stdout
# RUN: cat %s | %lldb --script-language lua 2> %t.stderr > %t.stdout
# RUN: cat %t.stdout | FileCheck %s --check-prefix STDOUT
# RUN: cat %t.stderr | FileCheck %s --check-prefix STDERR
script
file = lldb.SBFile(2, "w", false)
lldb.debugger:SetOutputFile(file)
io.write(95000 + 126, "\n")
quit
script
io.write(95000 + 14, "\n")

# STDOUT: 95126
# STDOUT-NOT: 95014
# STDERR: 95014

# RUN: rm -rf %t.stderr %t.stdout
# RUN: %lldb --script-language lua -o 'script io.stderr:write(95000 + 126, "\n")' 2> %t.stderr > %t.stdout
# RUN: cat %t.stdout | FileCheck %s --check-prefix STDOUT