diff options
| author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-02-12 21:33:51 -0500 |
|---|---|---|
| committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-02-16 07:49:44 -0500 |
| commit | 986eafce4708c8f49552d7dcd0cc5fe471caa655 (patch) | |
| tree | fd338dbbc51730bfdc29029708e71028800a1653 /src/nvim/testdir | |
| parent | 5e38516a462cf346e3379f68f4581afa22a9314c (diff) | |
| download | rneovim-986eafce4708c8f49552d7dcd0cc5fe471caa655.tar.gz rneovim-986eafce4708c8f49552d7dcd0cc5fe471caa655.tar.bz2 rneovim-986eafce4708c8f49552d7dcd0cc5fe471caa655.zip | |
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 vim/vim#5059)
https://github.com/vim/vim/commit/b40c2576d4e0e2dd2c580414c45947d88556d76d
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_writefile.vim | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_writefile.vim b/src/nvim/testdir/test_writefile.vim index 6066d61af4..56031662a3 100644 --- a/src/nvim/testdir/test_writefile.vim +++ b/src/nvim/testdir/test_writefile.vim @@ -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")) |