summaryrefslogtreecommitdiff
path: root/src/testdir/test_channel.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-02-10 21:32:19 +0100
committerBram Moolenaar <Bram@vim.org>2020-02-10 21:32:19 +0100
commitb3e195cca7b3201b188c1713b64012b1bef4f61f (patch)
tree807cac065c03984fe15891e8f7a93fb0a19803b8 /src/testdir/test_channel.vim
parent7ba3b91e0385c848c773e2f2d803db01730e7786 (diff)
downloadvim-git-b3e195cca7b3201b188c1713b64012b1bef4f61f.tar.gz
patch 8.2.0238: MS-Windows: job_stop() results in exit value zerov8.2.0238
Problem: MS-Windows: job_stop() results in exit value zero. Solution: Call TerminateJobObject() with -1 instead of 0. (Yasuhiro Matsumoto, closes #5150, closes #5614)
Diffstat (limited to 'src/testdir/test_channel.vim')
-rw-r--r--src/testdir/test_channel.vim15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim
index c2068105b..ebcd76e0f 100644
--- a/src/testdir/test_channel.vim
+++ b/src/testdir/test_channel.vim
@@ -1991,3 +1991,18 @@ func Test_job_start_fails()
" this was leaking memory
call assert_fails("call job_start([''])", "E474:")
endfunc
+
+func Test_issue_5150()
+ let g:job = job_start('grep foo', {})
+ call job_stop(g:job)
+ sleep 10m
+ call assert_equal(-1, job_info(g:job).exitval)
+ let g:job = job_start('grep foo', {})
+ call job_stop(g:job, 'term')
+ sleep 10m
+ call assert_equal(-1, job_info(g:job).exitval)
+ let g:job = job_start('grep foo', {})
+ call job_stop(g:job, 'kill')
+ sleep 10m
+ call assert_equal(-1, job_info(g:job).exitval)
+endfunc