aboutsummaryrefslogtreecommitdiff
path: root/test/functional/shada/errors_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/shada/errors_spec.lua')
-rw-r--r--test/functional/shada/errors_spec.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/functional/shada/errors_spec.lua b/test/functional/shada/errors_spec.lua
index a53b5cee2b..739f2ff148 100644
--- a/test/functional/shada/errors_spec.lua
+++ b/test/functional/shada/errors_spec.lua
@@ -490,4 +490,11 @@ $
eq('Vim(wshada):E576: Failed to parse ShaDa file: extra bytes in msgpack string at position 3', exc_exec('wshada ' .. shada_fname))
eq(0, exc_exec('wshada! ' .. shada_fname))
end)
+
+ it('fails on invalid ShaDa file (failing skip in second item)', function()
+ wshada('\001\000\001\128#!/')
+ eq('Vim(rshada):E576: Error while reading ShaDa file: last entry specified that it occupies 47 bytes, but file ended earlier', exc_exec(sdrcmd()))
+ eq('Vim(wshada):E576: Error while reading ShaDa file: last entry specified that it occupies 47 bytes, but file ended earlier', exc_exec('wshada ' .. shada_fname))
+ eq(0, exc_exec('wshada! ' .. shada_fname))
+ end)
end)