forked from aniani/vim
patch 8.1.2187: error for bad regexp even though regexp is not used
Problem: Error for bad regexp even though regexp is not used when writing
a file. (Arseny Nasokin)
Solution: Ignore regexp errors. (closes #5059)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
" Tests for the writefile() function.
|
||||
" Tests for the writefile() function and some :write commands.
|
||||
|
||||
func Test_writefile()
|
||||
let f = tempname()
|
||||
@@ -16,6 +16,11 @@ func Test_writefile()
|
||||
call delete(f)
|
||||
endfunc
|
||||
|
||||
func Test_writefile_ignore_regexp_error()
|
||||
write Xt[z-a]est.txt
|
||||
call delete('Xt[z-a]est.txt')
|
||||
endfunc
|
||||
|
||||
func Test_writefile_fails_gently()
|
||||
call assert_fails('call writefile(["test"], "Xfile", [])', 'E730:')
|
||||
call assert_false(filereadable("Xfile"))
|
||||
|
||||
Reference in New Issue
Block a user