diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-08-23 13:24:40 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2022-08-23 17:48:12 +0800 |
| commit | f1b8683b8c2f4a48d501c9dedef664f17761b8ac (patch) | |
| tree | 83f5692a8a4f400c0828d28794067875071fbe05 /src/nvim/testdir | |
| parent | d0b9fe2d5a95def67acc83f713b932f3f12dea08 (diff) | |
| download | rneovim-f1b8683b8c2f4a48d501c9dedef664f17761b8ac.tar.gz rneovim-f1b8683b8c2f4a48d501c9dedef664f17761b8ac.tar.bz2 rneovim-f1b8683b8c2f4a48d501c9dedef664f17761b8ac.zip | |
vim-patch:8.2.4841: empty string considered an error for expand()
Problem: Empty string considered an error for expand() when 'verbose' is
set. (Christian Brabandt)
Solution: Do not give an error for an empty result. (closes vim/vim#10307)
https://github.com/vim/vim/commit/a96edb736d4274fc4aea460800780e06e1510812
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_expand_func.vim | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_expand_func.vim b/src/nvim/testdir/test_expand_func.vim index df01d84f19..dfe4ce105c 100644 --- a/src/nvim/testdir/test_expand_func.vim +++ b/src/nvim/testdir/test_expand_func.vim @@ -107,10 +107,14 @@ 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. + call assert_equal("", expand('%')) + set verbose=1 + call assert_equal("", expand('%')) + set verbose=0 quit endfunc |