@@ -2,7 +2,8 @@ _T = require('lua_lldb_test').create_test('TestFileHandle')
2
2
3
3
function _T :TestLegacyFileOutScript ()
4
4
local f = io.open (self .output , ' w' )
5
- self .debugger :SetOutputFile (f )
5
+ local sbf = lldb .SBFile (f )
6
+ self .debugger :SetOutputFile (sbf )
6
7
self :handle_command (' script print(1+1)' )
7
8
self .debugger :GetOutputFileHandle ():write (' FOO\n ' )
8
9
self .debugger :GetOutputFileHandle ():flush ()
15
16
16
17
function _T :TestLegacyFileOut ()
17
18
local f = io.open (self .output , ' w' )
18
- self .debugger :SetOutputFile (f )
19
+ local sbf = lldb .SBFile (f )
20
+ self .debugger :SetOutputFile (sbf )
19
21
self :handle_command (' expression/x 3735928559' , false )
20
22
f :close ()
21
23
26
28
27
29
function _T :TestLegacyFileErr ()
28
30
local f = io.open (self .output , ' w' )
29
- self .debugger :SetErrorFile (f )
31
+ local sbf = lldb .SBFile (f )
32
+ self .debugger :SetErrorFile (sbf )
30
33
self :handle_command (' lol' , false )
34
+ f :close ()
31
35
32
36
f = io.open (self .output , ' r' )
33
37
assertStrContains (f :read (' *l' ), ' is not a valid command' )
0 commit comments