Problem: tests: Test_terminal_eof_arg() and
Test_terminal_duplicate_eof_arg() do not wait until the python
job finishes
Solution: Wait for the job to be dead before checking its exit value
(Vladimír Marek).
closes: #20571
Signed-off-by: Vladimír Marek <vlmarek13@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
call WaitFor({-> getline('$') =~ 'hello'})
call assert_equal('hello', getline('$'))
endif
call WaitFor({-> getline('$') =~ 'hello'})
call assert_equal('hello', getline('$'))
endif
- let exitval = bufnr()->term_getjob()->job_info().exitval
+ let job = bufnr()->term_getjob()
+ call WaitForAssert({-> assert_equal('dead', job_status(job))})
+ let exitval = job->job_info().exitval
if !has('win32')
call assert_equal(123, exitval)
else
if !has('win32')
call assert_equal(123, exitval)
else
call WaitFor({-> getline('$') =~ 'hello'})
call assert_equal('hello', getline('$'))
endif
call WaitFor({-> getline('$') =~ 'hello'})
call assert_equal('hello', getline('$'))
endif
- let exitval = bufnr()->term_getjob()->job_info().exitval
+ let job = bufnr()->term_getjob()
+ call WaitForAssert({-> assert_equal('dead', job_status(job))})
+ let exitval = job->job_info().exitval
if !has('win32')
call assert_equal(123, exitval)
else
if !has('win32')
call assert_equal(123, exitval)
else
static int included_patches[] =
{ /* Add new patch number below this line */
static int included_patches[] =
{ /* Add new patch number below this line */