diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-02-10 22:06:32 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-02-10 22:06:32 +0100 |
commit | 355757aed6ae2ae5446882570d89f243e4805937 (patch) | |
tree | ab4881042a9f6d88c7344394f9df8885d6024404 /src/testdir/test_channel.vim | |
parent | b3e195cca7b3201b188c1713b64012b1bef4f61f (diff) |
patch 8.2.0239: MS-Windows: 'env' job option does not override existing varsv8.2.0239
Problem: MS-Windows: 'env' job option does not override existing
environment variables. (Tim Pope)
Solution: Set the environment variables later. (Yasuhiro Matsumoto,
closes #5485, closes #5608)
Diffstat (limited to 'src/testdir/test_channel.vim')
-rw-r--r-- | src/testdir/test_channel.vim | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim index ebcd76e0ff..16fe5c7829 100644 --- a/src/testdir/test_channel.vim +++ b/src/testdir/test_channel.vim @@ -2006,3 +2006,12 @@ func Test_issue_5150() sleep 10m call assert_equal(-1, job_info(g:job).exitval) endfunc + +func Test_issue_5485() + let $VAR1 = 'global' + let g:Ch_reply = "" + let l:job = job_start([&shell, &shellcmdflag, has('win32') ? 'echo %VAR1% %VAR2%' : 'echo $VAR1 $VAR2'], {'env': {'VAR1': 'local', 'VAR2': 'local'}, 'callback': 'Ch_handler'}) + let g:Ch_job = l:job + call WaitForAssert({-> assert_equal("local local", trim(g:Ch_reply))}) + unlet $VAR1 +endfunc |