aboutsummaryrefslogtreecommitdiff
path: root/test/functional/shada/errors_spec.lua
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2015-08-08 19:47:32 +0300
committerZyX <kp-pav@yandex.ru>2015-10-08 22:00:34 +0300
commitfd4d5521a3445b36fba69046ba6fb0caad8f398d (patch)
treeaedbd9348b884a924d6faca67ebbbcb8ab91b3d0 /test/functional/shada/errors_spec.lua
parent17b5d27d85e772907fe3ca48fd8f58117564c72c (diff)
downloadrneovim-fd4d5521a3445b36fba69046ba6fb0caad8f398d.tar.gz
rneovim-fd4d5521a3445b36fba69046ba6fb0caad8f398d.tar.bz2
rneovim-fd4d5521a3445b36fba69046ba6fb0caad8f398d.zip
shada,functests: Use special sd_reader function for skipping
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)