summaryrefslogtreecommitdiff
path: root/src/testdir/test_startup.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-02-03 15:14:46 +0100
committerBram Moolenaar <Bram@vim.org>2018-02-03 15:14:46 +0100
commit4bfa8af14142e54f509048239f4e8596911f56aa (patch)
tree42d136ae2e49c5444802af12493c5c63c5197a28 /src/testdir/test_startup.vim
parent42b23fad1d9cdd6266f52d1ed7e0f3f17ce2d04b (diff)
downloadvim-git-4bfa8af14142e54f509048239f4e8596911f56aa.tar.gz
patch 8.0.1455: if $SHELL contains a space then 'shell' is incorrectv8.0.1455
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)
Diffstat (limited to 'src/testdir/test_startup.vim')
-rw-r--r--src/testdir/test_startup.vim14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/testdir/test_startup.vim b/src/testdir/test_startup.vim
index 6f67bfc11..42e489618 100644
--- 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.