diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-10-30 21:56:23 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-10-30 21:56:23 +0100 |
commit | ba6febd380c931b92361a189e85b19ed467c9c64 (patch) | |
tree | 86e7b30ed0e9902f1ce681a8535011ffe04bdf33 /src/testdir | |
parent | 48570488f17e397183ea7d5c7ca67d6e4ffb013d (diff) |
patch 8.0.1240: MS-Windows: term_start() does not support environmentv8.0.1240
Problem: MS-Windows: term_start() does not support environment.
Solution: Implement the environment argument. (Yasuhiro Matsumoto, closes
#2264)
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_terminal.vim | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim index bd7821d90d..95c1b98e70 100644 --- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -11,7 +11,11 @@ let s:python = PythonProg() " Open a terminal with a shell, assign the job to g:job and return the buffer " number. func Run_shell_in_terminal(options) - let buf = term_start(&shell, a:options) + if has('win32') + let buf = term_start([&shell,'/k'], a:options) + else + let buf = term_start(&shell, a:options) + endif let termlist = term_list() call assert_equal(1, len(termlist)) @@ -430,13 +434,14 @@ func Test_terminal_cwd() endfunc func Test_terminal_env() - if !has('unix') - return - endif let g:buf = Run_shell_in_terminal({'env': {'TESTENV': 'correct'}}) " Wait for the shell to display a prompt call WaitFor('term_getline(g:buf, 1) != ""') - call term_sendkeys(g:buf, "echo $TESTENV\r") + if has('win32') + call term_sendkeys(g:buf, "echo %TESTENV%\r") + else + call term_sendkeys(g:buf, "echo $TESTENV\r") + endif call term_wait(g:buf) call Stop_shell_in_terminal(g:buf) call WaitFor('getline(2) == "correct"') |