1 _T
= require('lua_lldb_test').create_test('TestProcessAPI')
3 function _T
:TestProcessLaunchSimple()
4 local target
= self
:create_target()
5 local args
= { 'arg1', 'arg2', 'arg3' }
6 local process
= target
:LaunchSimple(
14 assertTrue(process
:IsValid())
15 local stdout
= process
:GetSTDOUT(1000)
16 assertEquals(split_lines(stdout
), {self
.exe
, table.unpack(args
)})
19 function _T
:TestProcessLaunch()
20 local target
= self
:create_target()
21 local args
= { 'arg1', 'arg2', 'arg3' }
22 local error = lldb
.SBError()
23 local f
= io
.open(self
.output
, 'w')
26 local process
= target
:Launch(
28 self
.debugger
:GetListener(),
48 assertTrue(error:Success())
49 assertTrue(process
:IsValid())
50 local threads
= get_stopped_threads(process
, lldb
.eStopReasonSignal
)
51 assertTrue(#threads
~= 0)
52 local continue
= process
:Continue()
53 assertTrue(continue
:Success())
54 local f
= io
.open(self
.output
, 'r')
55 assertEquals(read_file_non_empty_lines(f
), {self
.exe
, table.unpack(args
)})