patch 8.2.0644: insufficient testing for invalid function arguments
Problem: Insufficient testing for invalid function arguments.
Solution: Add more tests. (Yegappan Lakshmanan, closes #5988)
diff --git a/src/testdir/test_writefile.vim b/src/testdir/test_writefile.vim
index 497fa0b..58e438c 100644
--- a/src/testdir/test_writefile.vim
+++ b/src/testdir/test_writefile.vim
@@ -207,6 +207,12 @@
close!
enew | only
call delete('Xfile')
+
+ call writefile(test_null_list(), 'Xfile')
+ call assert_false(filereadable('Xfile'))
+ call writefile(test_null_blob(), 'Xfile')
+ call assert_false(filereadable('Xfile'))
+ call assert_fails('call writefile([], "")', 'E482:')
endfunc
func Test_write_errors()
@@ -245,6 +251,12 @@
close
call delete('Xfile')
+
+ call writefile(test_null_list(), 'Xfile')
+ call assert_false(filereadable('Xfile'))
+ call writefile(test_null_blob(), 'Xfile')
+ call assert_false(filereadable('Xfile'))
+ call assert_fails('call writefile([], "")', 'E482:')
endfunc
" vim: shiftwidth=2 sts=2 expandtab