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)
diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim
index c2d9066..dc06bd7 100644
--- a/src/testdir/test_functions.vim
+++ b/src/testdir/test_functions.vim
@@ -2516,6 +2516,19 @@
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()