From e683ed8a68ff232a7bcfa520b5f0111a3aaf3deb Mon Sep 17 00:00:00 2001 From: "K.Takata" Date: Fri, 6 Mar 2020 23:46:10 +0900 Subject: [PATCH] win32: Fix that the test for #5150 may not work The test for #5150 doesn't work when "grep" is not available in the PATH. --- src/testdir/test_channel.vim | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim index c98f5bd683cbe..e1f8a5e352e42 100644 --- a/src/testdir/test_channel.vim +++ b/src/testdir/test_channel.vim @@ -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)