summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_channel.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-10-07 21:36:11 +0200
committerBram Moolenaar <Bram@vim.org>2018-10-07 21:36:11 +0200
commit1df2fa47b49dae568af6048b1dce1edbf4eee7e7 (patch)
tree4f50ded46c1f891715df3b43c30a2c7bc7693daf /src/testdir/test_channel.vim
parent798184cc67036285a24b38c0bf6668d4d1525548 (diff)
patch 8.1.0464: MS-Windows: job_info() has cmd without backslashesv8.1.0464
Problem: MS-Windows: job_info() has cmd without backslashes. (Daniel Hahler) Solution: Use rem_backslash(). (closes #3517, closes #3404)
Diffstat (limited to 'src/testdir/test_channel.vim')
-rw-r--r--src/testdir/test_channel.vim16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim
index 5d071473a5..832f54e7c8 100644
--- a/src/testdir/test_channel.vim
+++ b/src/testdir/test_channel.vim
@@ -1721,6 +1721,22 @@ func Test_read_from_terminated_job()
call WaitForAssert({-> assert_equal(1, g:linecount)})
endfunc
+func Test_job_start_windows()
+ if !has('job') || !has('win32')
+ return
+ endif
+
+ " Check that backslash in $COMSPEC is handled properly.
+ let g:echostr = ''
+ let cmd = $COMSPEC . ' /c echo 123'
+ let job = job_start(cmd, {'callback': {ch,msg -> execute(":let g:echostr .= msg")}})
+ let info = job_info(job)
+ call assert_equal([$COMSPEC, '/c', 'echo', '123'], info.cmd)
+
+ call WaitForAssert({-> assert_equal("123", g:echostr)})
+ unlet g:echostr
+endfunc
+
func Test_env()
if !has('job')
return