aboutsummaryrefslogtreecommitdiff
path: root/test/functional/shada/history_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/shada/history_spec.lua')
-rw-r--r--test/functional/shada/history_spec.lua62
1 files changed, 31 insertions, 31 deletions
diff --git a/test/functional/shada/history_spec.lua b/test/functional/shada/history_spec.lua
index 5a7db2bfa6..595938bfb2 100644
--- a/test/functional/shada/history_spec.lua
+++ b/test/functional/shada/history_spec.lua
@@ -13,23 +13,23 @@ describe('ShaDa support code', function()
after_each(clear)
it('is able to dump and read back command-line history', function()
- nvim_command('set viminfo=\'0')
+ nvim_command('set shada=\'0')
nvim_feed(':" Test\n')
- nvim_command('wviminfo')
+ nvim_command('wshada')
reset()
- nvim_command('set viminfo=\'0')
- nvim_command('rviminfo')
+ nvim_command('set shada=\'0')
+ nvim_command('rshada')
eq('" Test', nvim_eval('histget(":", -1)'))
end)
it('is able to dump and read back 2 items in command-line history', function()
- nvim_command('set viminfo=\'0 history=2')
+ nvim_command('set shada=\'0 history=2')
nvim_feed(':" Test\n')
nvim_feed(':" Test 2\n')
nvim_command('qall')
reset()
- nvim_command('set viminfo=\'0 history=2')
- nvim_command('rviminfo')
+ nvim_command('set shada=\'0 history=2')
+ nvim_command('rshada')
eq('" Test 2', nvim_eval('histget(":", -1)'))
eq('" Test', nvim_eval('histget(":", -2)'))
nvim_command('qall')
@@ -37,50 +37,50 @@ describe('ShaDa support code', function()
it('respects &history when dumping',
function()
- nvim_command('set viminfo=\'0 history=1')
+ nvim_command('set shada=\'0 history=1')
nvim_feed(':" Test\n')
nvim_feed(':" Test 2\n')
- nvim_command('wviminfo')
+ nvim_command('wshada')
reset()
- nvim_command('set viminfo=\'0 history=2')
- nvim_command('rviminfo')
+ nvim_command('set shada=\'0 history=2')
+ nvim_command('rshada')
eq('" Test 2', nvim_eval('histget(":", -1)'))
eq('', nvim_eval('histget(":", -2)'))
end)
it('respects &history when loading',
function()
- nvim_command('set viminfo=\'0 history=2')
+ nvim_command('set shada=\'0 history=2')
nvim_feed(':" Test\n')
nvim_feed(':" Test 2\n')
- nvim_command('wviminfo')
+ nvim_command('wshada')
reset()
- nvim_command('set viminfo=\'0 history=1')
- nvim_command('rviminfo')
+ nvim_command('set shada=\'0 history=1')
+ nvim_command('rshada')
eq('" Test 2', nvim_eval('histget(":", -1)'))
eq('', nvim_eval('histget(":", -2)'))
end)
it('dumps only requested amount of command-line history items', function()
- nvim_command('set viminfo=\'0,:1')
+ nvim_command('set shada=\'0,:1')
nvim_feed(':" Test\n')
nvim_feed(':" Test 2\n')
- nvim_command('wviminfo')
+ nvim_command('wshada')
reset()
- nvim_command('set viminfo=\'0')
- nvim_command('rviminfo')
+ nvim_command('set shada=\'0')
+ nvim_command('rshada')
eq('" Test 2', nvim_eval('histget(":", -1)'))
eq('', nvim_eval('histget(":", -2)'))
end)
- it('does not respect number in &viminfo when loading history', function()
- nvim_command('set viminfo=\'0')
+ it('does not respect number in &shada when loading history', function()
+ nvim_command('set shada=\'0')
nvim_feed(':" Test\n')
nvim_feed(':" Test 2\n')
- nvim_command('wviminfo')
+ nvim_command('wshada')
reset()
- nvim_command('set viminfo=\'0,:1')
- nvim_command('rviminfo')
+ nvim_command('set shada=\'0,:1')
+ nvim_command('rshada')
eq('" Test 2', nvim_eval('histget(":", -1)'))
eq('" Test', nvim_eval('histget(":", -2)'))
end)
@@ -93,9 +93,9 @@ describe('ShaDa support code', function()
nvim_feed('/Test\n') -- Search history
nvim_feed(':" Test\n') -- Command-line history
nvim_command('0debuggreedy')
- nvim_command('wviminfo')
+ nvim_command('wshada')
reset()
- nvim_command('rviminfo')
+ nvim_command('rshada')
eq('" Test', nvim_eval('histget(":", -1)'))
eq('Test', nvim_eval('histget("/", -1)'))
eq('"Test"', nvim_eval('histget("=", -1)'))
@@ -107,7 +107,7 @@ describe('ShaDa support code', function()
nvim_eval('setline(".", ["foo", "bar"])')
nvim_feed('gg0/a/e+1\n')
eq({0, 2, 3, 0}, nvim_eval('getpos(".")'))
- nvim_command('wviminfo')
+ nvim_command('wshada')
reset()
nvim_eval('setline(".", ["foo", "bar"])')
nvim_feed('gg0n')
@@ -118,7 +118,7 @@ describe('ShaDa support code', function()
nvim_eval('setline(".", ["foo", "bar"])')
nvim_command('%s/f/g/g')
eq('goo', nvim_eval('getline(1)'))
- nvim_command('wviminfo')
+ nvim_command('wshada')
reset()
nvim_eval('setline(".", ["foo", "bar"])')
nvim_command('&')
@@ -241,7 +241,7 @@ describe('ShaDa support code', function()
reset()
-- \171 is U+00AB LEFT-POINTING DOUBLE ANGLE QUOTATION MARK in latin1
nvim_command('silent! /\171/')
- nvim_command('set viminfo+=/0')
+ nvim_command('set shada+=/0')
nvim_command('qall!')
reset()
nvim_eval('setline(".", ["\171«"])')
@@ -256,7 +256,7 @@ describe('ShaDa support code', function()
reset()
-- \171 is U+00AB LEFT-POINTING DOUBLE ANGLE QUOTATION MARK in latin1
nvim_command('silent! /\171/')
- nvim_command('set viminfo+=/0')
+ nvim_command('set shada+=/0')
set_additional_cmd('')
nvim_command('qall')
reset()
@@ -270,7 +270,7 @@ describe('ShaDa support code', function()
function()
-- \171 is U+00AB LEFT-POINTING DOUBLE ANGLE QUOTATION MARK in latin1
nvim_command('silent! /«/')
- nvim_command('set viminfo+=/0')
+ nvim_command('set shada+=/0')
set_additional_cmd('set encoding=latin1')
nvim_command('qall')
reset()