@@ -2,7 +2,8 @@ _T = require('lua_lldb_test').create_test('TestFileHandle')
22
33function _T :TestLegacyFileOutScript ()
44 local f = io.open (self .output , ' w' )
5- self .debugger :SetOutputFile (f )
5+ local sbf = lldb .SBFile (f )
6+ self .debugger :SetOutputFile (sbf )
67 self :handle_command (' script print(1+1)' )
78 self .debugger :GetOutputFileHandle ():write (' FOO\n ' )
89 self .debugger :GetOutputFileHandle ():flush ()
1516
1617function _T :TestLegacyFileOut ()
1718 local f = io.open (self .output , ' w' )
18- self .debugger :SetOutputFile (f )
19+ local sbf = lldb .SBFile (f )
20+ self .debugger :SetOutputFile (sbf )
1921 self :handle_command (' expression/x 3735928559' , false )
2022 f :close ()
2123
2628
2729function _T :TestLegacyFileErr ()
2830 local f = io.open (self .output , ' w' )
29- self .debugger :SetErrorFile (f )
31+ local sbf = lldb .SBFile (f )
32+ self .debugger :SetErrorFile (sbf )
3033 self :handle_command (' lol' , false )
34+ f :close ()
3135
3236 f = io.open (self .output , ' r' )
3337 assertStrContains (f :read (' *l' ), ' is not a valid command' )
0 commit comments