diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-03-04 14:37:18 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-03-04 14:37:18 +0100 |
commit | 08cab9608781c975b4acbad875862b842b29258d (patch) | |
tree | e29281ee0634fe4d3405873b87dfbfd360c145b4 /src/testdir/test_startup.vim | |
parent | 391b1dd040af204b150d43c5a1c97477ee450a28 (diff) |
patch 8.0.0405: v:progpath may become invalid after :cdv8.0.0405
Problem: v:progpath may become invalid after ":cd".
Solution: Turn v:progpath into a full path if needed.
Diffstat (limited to 'src/testdir/test_startup.vim')
-rw-r--r-- | src/testdir/test_startup.vim | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/testdir/test_startup.vim b/src/testdir/test_startup.vim index 8e3238ca1e..9d591385fb 100644 --- a/src/testdir/test_startup.vim +++ b/src/testdir/test_startup.vim @@ -183,3 +183,17 @@ func Test_read_stdin() endif call delete('Xtestout') endfunc + +func Test_progpath() + " Tests normally run with "./vim" or "../vim", these must have been expanded + " to a full path. + if has('unix') + call assert_equal('/', v:progpath[0]) + elseif has('win32') + call assert_equal(':', v:progpath[1]) + call assert_match('[/\\]', v:progpath[2]) + endif + + " Only expect "vim" to appear in v:progname. + call assert_match('vim\c', v:progname) +endfunc |