Skip to content

Commit

Permalink
win32: Fix that the test for vim#5150 may not work
Browse files Browse the repository at this point in the history
The test for vim#5150 doesn't work when "grep" is not available in the PATH.
  • Loading branch information
k-takata committed Mar 6, 2020
1 parent 49b79bd commit e683ed8
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/testdir/test_channel.vim
Original file line number Diff line number Diff line change
Expand Up @@ -1992,15 +1992,20 @@ func Test_job_start_fails()
endfunc

func Test_issue_5150()
let g:job = job_start('grep foo', {})
if has('win32')
let cmd = 'cmd /c pause'
else
let cmd = 'grep foo'
endif
let g:job = job_start(cmd, {})
call job_stop(g:job)
sleep 10m
call assert_equal(-1, job_info(g:job).exitval)
let g:job = job_start('grep foo', {})
let g:job = job_start(cmd, {})
call job_stop(g:job, 'term')
sleep 10m
call assert_equal(-1, job_info(g:job).exitval)
let g:job = job_start('grep foo', {})
let g:job = job_start(cmd, {})
call job_stop(g:job, 'kill')
sleep 10m
call assert_equal(-1, job_info(g:job).exitval)
Expand Down

0 comments on commit e683ed8

Please sign in to comment.