diff options
| author | Bram Moolenaar <Bram@vim.org> | 2022-04-28 19:09:03 +0100 |
|---|---|---|
| committer | Bram Moolenaar <Bram@vim.org> | 2022-04-28 19:09:03 +0100 |
| commit | 211a5bb2353c66684f38527184a258921f95c9d9 (patch) | |
| tree | 72c3147098eebf1720061ebd8fa3996b7eeb50fb /src/testdir/test_expand_func.vim | |
| parent | a96edb736d4274fc4aea460800780e06e1510812 (diff) | |
| download | vim-git-8.2.4842.tar.gz | |
patch 8.2.4842: expand("%:p") is not empty when there is no buffer namev8.2.4842
Problem: expand("%:p") is not empty when there is no buffer name.
Solution: When ignoring errors still return NULL. (closes #10311)
Diffstat (limited to 'src/testdir/test_expand_func.vim')
| -rw-r--r-- | src/testdir/test_expand_func.vim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/testdir/test_expand_func.vim b/src/testdir/test_expand_func.vim index 59156afe3..d9327bf3e 100644 --- a/src/testdir/test_expand_func.vim +++ b/src/testdir/test_expand_func.vim @@ -82,7 +82,7 @@ endfunc func Test_expand() new - call assert_equal("''", expand('%:S')) + call assert_equal("", expand('%:S')) call assert_equal('3', '<slnum>'->expand()) call assert_equal(['4'], expand('<slnum>', v:false, v:true)) " Don't add any line above this, otherwise <slnum> will change. @@ -90,6 +90,7 @@ func Test_expand() set verbose=1 call assert_equal("", expand('%')) set verbose=0 + call assert_equal("", expand('%:p')) quit endfunc |
