0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 8.2.1505: not all file read and writecode is tested

Problem:    Not all file read and writecode is tested.
Solution:   Add a few tests. (Dominique Pellé, closes #6764)
This commit is contained in:
Bram Moolenaar
2020-08-21 22:46:11 +02:00
parent 7cb6fc29d0
commit 1b04ce2d40
4 changed files with 40 additions and 6 deletions

View File

@@ -2516,6 +2516,19 @@ endfunc
func Test_glob()
call assert_equal('', glob(test_null_string()))
call assert_equal('', globpath(test_null_string(), test_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
" Test for browse()