diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-09-03 09:39:13 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-03 09:39:13 +0800 |
commit | 042d5df9567bc37fb4a46bcf43f0f46b16eadf6d (patch) | |
tree | ee597105bada2b66d4d51b6086c70b5e8c39e48a /src/nvim/testdir/test_functions.vim | |
parent | 1ffd527c837fb2465c9659273bbe5447a1352db2 (diff) | |
parent | c62e5b50795d38db68f198a3d1230c047fc0ccfa (diff) | |
download | rneovim-042d5df9567bc37fb4a46bcf43f0f46b16eadf6d.tar.gz rneovim-042d5df9567bc37fb4a46bcf43f0f46b16eadf6d.tar.bz2 rneovim-042d5df9567bc37fb4a46bcf43f0f46b16eadf6d.zip |
Merge pull request #20063 from zeertzjq/vim-9.0.0360
vim-patch:8.2.1505,9.0.{0360,0362}
Diffstat (limited to 'src/nvim/testdir/test_functions.vim')
-rw-r--r-- | src/nvim/testdir/test_functions.vim | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim index 147eda5b0a..99ac6ae32c 100644 --- a/src/nvim/testdir/test_functions.vim +++ b/src/nvim/testdir/test_functions.vim @@ -2015,6 +2015,25 @@ func Test_getmousepos() bwipe! endfunc +" Test for glob() +func Test_glob() + call assert_equal('', glob(v:_null_string)) + call assert_equal('', globpath(v:_null_string, v:_null_string)) + + call writefile([], 'Xglob1') + call writefile([], 'XGLOB2') + set wildignorecase + " Sort output of glob() otherwise we end up with different + " ordering depending on whether file system is case-sensitive. + call assert_equal(['XGLOB2', 'Xglob1'], sort(glob('Xglob[12]', 0, 1))) + set wildignorecase& + + call delete('Xglob1') + call delete('XGLOB2') + + call assert_fails("call glob('*', 0, {})", 'E728:') +endfunc + func HasDefault(msg = 'msg') return a:msg endfunc |