summaryrefslogtreecommitdiff
path: root/src/testdir/test_viminfo.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir/test_viminfo.vim')
-rw-r--r--src/testdir/test_viminfo.vim19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/testdir/test_viminfo.vim b/src/testdir/test_viminfo.vim
index 1fefba1b6..9d55600f9 100644
--- a/src/testdir/test_viminfo.vim
+++ b/src/testdir/test_viminfo.vim
@@ -201,3 +201,22 @@ func Test_viminfo_encoding()
call delete('Xviminfo')
endfunc
+
+func Test_viminfo_bad_syntax()
+ let lines = []
+ call add(lines, '|<') " empty continuation line
+ call add(lines, '|234234234234234324,nothing')
+ call add(lines, '|1+"no comma"')
+ call add(lines, '|1,2,3,4,5,6,7') " too many items
+ call add(lines, '|1,"string version"')
+ call add(lines, '|1,>x') " bad continuation line
+ call add(lines, '|1,"x') " missing quote
+ call add(lines, '|1,"x\') " trailing backslash
+ call add(lines, '|1,,,,') "trailing comma
+ call add(lines, '|1,>234') " trailing continuation line
+ call writefile(lines, 'Xviminfo')
+ call assert_fails('rviminfo Xviminfo', 'E685:')
+
+ call delete('Xviminfo')
+endfunc
+