Mercurial > vim
comparison src/testdir/test_startup.vim @ 11032:516391d8865f v8.0.0405
patch 8.0.0405: v:progpath may become invalid after :cd
commit https://github.com/vim/vim/commit/08cab9608781c975b4acbad875862b842b29258d
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Mar 4 14:37:18 2017 +0100
patch 8.0.0405: v:progpath may become invalid after :cd
Problem: v:progpath may become invalid after ":cd".
Solution: Turn v:progpath into a full path if needed.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 04 Mar 2017 14:45:05 +0100 |
parents | 6049c1f01391 |
children | 84f71a8a5f2c |
comparison
equal
deleted
inserted
replaced
11031:4dbc86032a4c | 11032:516391d8865f |
---|---|
181 " MS-Windows adds a space after the word | 181 " MS-Windows adds a space after the word |
182 call assert_equal(['something'], split(lines[0])) | 182 call assert_equal(['something'], split(lines[0])) |
183 endif | 183 endif |
184 call delete('Xtestout') | 184 call delete('Xtestout') |
185 endfunc | 185 endfunc |
186 | |
187 func Test_progpath() | |
188 " Tests normally run with "./vim" or "../vim", these must have been expanded | |
189 " to a full path. | |
190 if has('unix') | |
191 call assert_equal('/', v:progpath[0]) | |
192 elseif has('win32') | |
193 call assert_equal(':', v:progpath[1]) | |
194 call assert_match('[/\\]', v:progpath[2]) | |
195 endif | |
196 | |
197 " Only expect "vim" to appear in v:progname. | |
198 call assert_match('vim\c', v:progname) | |
199 endfunc |