aboutsummaryrefslogtreecommitdiff
path: root/test/functional/shada/variables_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/shada/variables_spec.lua')
-rw-r--r--test/functional/shada/variables_spec.lua48
1 files changed, 24 insertions, 24 deletions
diff --git a/test/functional/shada/variables_spec.lua b/test/functional/shada/variables_spec.lua
index 0ffa524238..c2fa25bcb1 100644
--- a/test/functional/shada/variables_spec.lua
+++ b/test/functional/shada/variables_spec.lua
@@ -14,21 +14,21 @@ describe('ShaDa support code', function()
it('is able to dump and read back string variable', function()
nvim('set_var', 'STRVAR', 'foo')
- nvim_command('set viminfo+=!')
- nvim_command('wviminfo')
+ nvim_command('set shada+=!')
+ nvim_command('wshada')
reset()
- nvim_command('set viminfo+=!')
- nvim_command('rviminfo')
+ nvim_command('set shada+=!')
+ nvim_command('rshada')
eq('foo', nvim('get_var', 'STRVAR'))
end)
local autotest = function(tname, varname, varval)
it('is able to dump and read back ' .. tname .. ' variable automatically',
function()
- set_additional_cmd('set viminfo+=!')
+ set_additional_cmd('set shada+=!')
reset()
nvim('set_var', varname, varval)
- -- Exit during `reset` is not a regular exit: it does not write viminfo
+ -- Exit during `reset` is not a regular exit: it does not write shada
-- automatically
nvim_command('qall')
reset()
@@ -42,43 +42,43 @@ describe('ShaDa support code', function()
autotest('dictionary', 'DCTVAR', {a=10})
autotest('list', 'LSTVAR', {{a=10}, {b=10.5}, {c='str'}})
- it('does not read back variables without `!` in &viminfo', function()
+ it('does not read back variables without `!` in &shada', function()
nvim('set_var', 'STRVAR', 'foo')
- nvim_command('set viminfo+=!')
- nvim_command('wviminfo')
- set_additional_cmd('set viminfo-=!')
+ nvim_command('set shada+=!')
+ nvim_command('wshada')
+ set_additional_cmd('set shada-=!')
reset()
- nvim_command('rviminfo')
+ nvim_command('rshada')
eq(0, nvim_eval('exists("g:STRVAR")'))
end)
- it('does not dump variables without `!` in &viminfo', function()
- nvim_command('set viminfo-=!')
+ it('does not dump variables without `!` in &shada', function()
+ nvim_command('set shada-=!')
nvim('set_var', 'STRVAR', 'foo')
- nvim_command('wviminfo')
+ nvim_command('wshada')
reset()
- nvim_command('set viminfo+=!')
- nvim_command('rviminfo')
+ nvim_command('set shada+=!')
+ nvim_command('rshada')
eq(0, nvim_eval('exists("g:STRVAR")'))
end)
it('does not dump session variables', function()
- nvim_command('set viminfo+=!')
+ nvim_command('set shada+=!')
nvim('set_var', 'StrVar', 'foo')
- nvim_command('wviminfo')
+ nvim_command('wshada')
reset()
- nvim_command('set viminfo+=!')
- nvim_command('rviminfo')
+ nvim_command('set shada+=!')
+ nvim_command('rshada')
eq(0, nvim_eval('exists("g:StrVar")'))
end)
it('does not dump regular variables', function()
- nvim_command('set viminfo+=!')
+ nvim_command('set shada+=!')
nvim('set_var', 'str_var', 'foo')
- nvim_command('wviminfo')
+ nvim_command('wshada')
reset()
- nvim_command('set viminfo+=!')
- nvim_command('rviminfo')
+ nvim_command('set shada+=!')
+ nvim_command('rshada')
eq(0, nvim_eval('exists("g:str_var")'))
end)