Mercurial > vim
diff src/testdir/test_startup.vim @ 18241:85160a3649b9 v8.1.2115
patch 8.1.2115: MS-Windows: shell commands fail if &shell contains a space
Commit: https://github.com/vim/vim/commit/2efc44b3f0b6bd8307cb281af095e08e15ab1c24
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Oct 5 12:09:32 2019 +0200
patch 8.1.2115: MS-Windows: shell commands fail if &shell contains a space
Problem: MS-Windows: shell commands fail if &shell contains a space.
Solution: Use quotes instead of escaping. (closes https://github.com/vim/vim/issues/4920)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 05 Oct 2019 12:15:04 +0200 |
parents | 0da9bc55c31a |
children | e93cab5d0f0f |
line wrap: on
line diff
--- 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