Mercurial > vim
diff src/testdir/test_startup.vim @ 13162:51521b8a370c v8.0.1455
patch 8.0.1455: if $SHELL contains a space then 'shell' is incorrect
commit https://github.com/vim/vim/commit/4bfa8af14142e54f509048239f4e8596911f56aa
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 3 15:14:46 2018 +0100
patch 8.0.1455: if $SHELL contains a space then 'shell' is incorrect
Problem: If $SHELL contains a space then the default value of 'shell' is
incorrect. (Matthew Horan)
Solution: Escape spaces in $SHELL. (Christian Brabandt, closes #459)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 03 Feb 2018 15:15:05 +0100 |
parents | 241fbf588b95 |
children | 66e241c3a2f0 |
line wrap: on
line diff
--- a/src/testdir/test_startup.vim +++ b/src/testdir/test_startup.vim @@ -226,6 +226,20 @@ func Test_read_stdin() call delete('Xtestout') endfunc +func Test_set_shell() + let after = [ + \ 'call writefile([&shell], "Xtestout")', + \ 'quit!', + \ ] + let $SHELL = '/bin/with space/sh' + if RunVimPiped([], after, '', '') + let lines = readfile('Xtestout') + " MS-Windows adds a space after the word + call assert_equal('/bin/with\ space/sh', lines[0]) + endif + call delete('Xtestout') +endfunc + func Test_progpath() " Tests normally run with "./vim" or "../vim", these must have been expanded " to a full path.