local shada_helpers = require('test.functional.shada.helpers')
6
7
local reset, clear, get_shada_rw =
492
493
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))
493
494
eq(0, exc_exec('wshada! ' .. shada_fname))
494
495
end)
496
497
it('errors when a funcref is stored in a variable', function()
498
nvim_command('let F = function("tr")')
499
nvim_command('set shada+=!')
500
eq('\nE951: Error while dumping variable g:F, itself: attempt to dump function reference'
501
.. '\nE574: Failed to write variable F',
502
redir_exec('wshada'))
503
end)
504
505
it('errors when a self-referencing list is stored in a variable', function()
506
nvim_command('let L = []')
507
nvim_command('call add(L, L)')
508
nvim_command('set shada+=!')
509
eq('\nE952: Unable to dump variable g:L: container references itself in index 0'