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)
diff --git a/src/testdir/test_startup.vim b/src/testdir/test_startup.vim
index 6f67bfc..42e4896 100644
--- a/src/testdir/test_startup.vim
+++ b/src/testdir/test_startup.vim
@@ -226,6 +226,20 @@
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.