Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
13161:12a782ea6e51 | 13162:51521b8a370c |
---|---|
224 call assert_equal(['something'], split(lines[0])) | 224 call assert_equal(['something'], split(lines[0])) |
225 endif | 225 endif |
226 call delete('Xtestout') | 226 call delete('Xtestout') |
227 endfunc | 227 endfunc |
228 | 228 |
229 func Test_set_shell() | |
230 let after = [ | |
231 \ 'call writefile([&shell], "Xtestout")', | |
232 \ 'quit!', | |
233 \ ] | |
234 let $SHELL = '/bin/with space/sh' | |
235 if RunVimPiped([], after, '', '') | |
236 let lines = readfile('Xtestout') | |
237 " MS-Windows adds a space after the word | |
238 call assert_equal('/bin/with\ space/sh', lines[0]) | |
239 endif | |
240 call delete('Xtestout') | |
241 endfunc | |
242 | |
229 func Test_progpath() | 243 func Test_progpath() |
230 " Tests normally run with "./vim" or "../vim", these must have been expanded | 244 " Tests normally run with "./vim" or "../vim", these must have been expanded |
231 " to a full path. | 245 " to a full path. |
232 if has('unix') | 246 if has('unix') |
233 call assert_equal('/', v:progpath[0]) | 247 call assert_equal('/', v:progpath[0]) |