summaryrefslogtreecommitdiff
path: root/src/testdir/test_startup.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-10-05 12:09:32 +0200
committerBram Moolenaar <Bram@vim.org>2019-10-05 12:09:32 +0200
commit2efc44b3f0b6bd8307cb281af095e08e15ab1c24 (patch)
tree4245a8fef089e696e8eb6df87e02cafbc4d7806e /src/testdir/test_startup.vim
parentfd00c042afc40539447e798aadbd0a2219fdbdc1 (diff)
downloadvim-git-2efc44b3f0b6bd8307cb281af095e08e15ab1c24.tar.gz
patch 8.1.2115: MS-Windows: shell commands fail if &shell contains a spacev8.1.2115
Problem: MS-Windows: shell commands fail if &shell contains a space. Solution: Use quotes instead of escaping. (closes #4920)
Diffstat (limited to 'src/testdir/test_startup.vim')
-rw-r--r--src/testdir/test_startup.vim12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/testdir/test_startup.vim b/src/testdir/test_startup.vim
index ceee044ca..f10eabb79 100644
--- a/src/testdir/test_startup.vim
+++ b/src/testdir/test_startup.vim
@@ -574,11 +574,17 @@ func Test_set_shell()
quit!
[CODE]
- let $SHELL = '/bin/with space/sh'
+ if has('win32')
+ let $SHELL = 'C:\with space\cmd.exe'
+ let expected = '"C:\with space\cmd.exe"'
+ else
+ let $SHELL = '/bin/with space/sh'
+ let expected = '/bin/with\ space/sh'
+ endif
+
if RunVimPiped([], after, '', '')
let lines = readfile('Xtestout')
- " MS-Windows adds a space after the word
- call assert_equal('/bin/with\ space/sh', lines[0])
+ call assert_equal(expected, lines[0])
endif
call delete('Xtestout')
endfunc