diff options
Diffstat (limited to 'test/functional/shada/helpers.lua')
-rw-r--r-- | test/functional/shada/helpers.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/functional/shada/helpers.lua b/test/functional/shada/helpers.lua index cc554097c6..d4eb7f57bd 100644 --- a/test/functional/shada/helpers.lua +++ b/test/functional/shada/helpers.lua @@ -3,7 +3,7 @@ local spawn, set_session, meths, nvim_prog = helpers.spawn, helpers.set_session, helpers.meths, helpers.nvim_prog local write_file, merge_args = helpers.write_file, helpers.merge_args -local msgpack = require('MessagePack') +local mpack = require('mpack') local tmpname = os.tmpname() local additional_cmd = '' @@ -60,13 +60,13 @@ local read_shada_file = function(fname) local fd = io.open(fname, 'r') local mstring = fd:read('*a') fd:close() - local unpacker = msgpack.unpacker(mstring) + local unpack = mpack.Unpacker() local ret = {} - local cur + local cur, val local i = 0 - while true do - local off, val = unpacker() - if not off then break end + local off = 1 + while off <= #mstring do + val, off = unpack(mstring, off) if i % 4 == 0 then cur = {} ret[#ret + 1] = cur |