[lldb/Lua] Use the debugger's output and error file for Lua's I/O library.
Add support for changing the stdout and stderr file in Lua's I/O library and hook it up with the debugger's output and error file respectively for the interactive Lua interpreter. https://reviews.llvm.org/D82273
This commit is contained in:
16
lldb/test/Shell/ScriptInterpreter/Lua/io.test
Normal file
16
lldb/test/Shell/ScriptInterpreter/Lua/io.test
Normal file
@@ -0,0 +1,16 @@
|
||||
# REQUIRES: lua
|
||||
# UNSUPPORTED: lldb-repro
|
||||
#
|
||||
# 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
|
||||
Reference in New Issue
Block a user