aboutsummaryrefslogtreecommitdiff
path: root/test/functional/shada/marks_spec.lua
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2015-07-05 03:13:00 +0300
committerZyX <kp-pav@yandex.ru>2015-10-08 21:59:56 +0300
commitd1ae27ceec467605d02e6388d5b8007bc9359d52 (patch)
treee730ab35af41bde1b62c40970eacb9dcbf9719ce /test/functional/shada/marks_spec.lua
parentcf004c0d41833349eca0d7f7947e80dd8fc7aea7 (diff)
downloadrneovim-d1ae27ceec467605d02e6388d5b8007bc9359d52.tar.gz
rneovim-d1ae27ceec467605d02e6388d5b8007bc9359d52.tar.bz2
rneovim-d1ae27ceec467605d02e6388d5b8007bc9359d52.zip
shada,functests: Refactor shada items skipping
Diffstat (limited to 'test/functional/shada/marks_spec.lua')
-rw-r--r--test/functional/shada/marks_spec.lua18
1 files changed, 16 insertions, 2 deletions
diff --git a/test/functional/shada/marks_spec.lua b/test/functional/shada/marks_spec.lua
index f1a112bfef..a6518ccbf9 100644
--- a/test/functional/shada/marks_spec.lua
+++ b/test/functional/shada/marks_spec.lua
@@ -48,13 +48,13 @@ describe('ShaDa support code', function()
eq(2, nvim_current_line())
end)
- it('does not read back global mark without `f0` in viminfo', function()
+ it('does not dump global mark with `f0` in viminfo', function()
+ nvim_command('set viminfo+=f0')
nvim_command('edit ' .. testfilename)
nvim_command('mark A')
nvim_command('2')
nvim_command('kB')
nvim_command('wviminfo')
- set_additional_cmd('set viminfo+=f0')
reset()
nvim_command('language C')
nvim_command([[
@@ -66,6 +66,20 @@ describe('ShaDa support code', function()
eq('Vim(normal):E20: Mark not set', nvim('get_var', 'exception'))
end)
+ it('does read back global mark even with `\'0` and `f0` in viminfo', function()
+ nvim_command('edit ' .. testfilename)
+ nvim_command('mark A')
+ nvim_command('2')
+ nvim_command('kB')
+ nvim_command('wviminfo')
+ set_additional_cmd('set viminfo=\'0,f0')
+ reset()
+ nvim_command('language C')
+ nvim_command('normal! `A')
+ eq(testfilename, nvim_eval('fnamemodify(@%, ":t")'))
+ eq(1, nvim_current_line())
+ end)
+
it('is able to dump and read back local mark', function()
nvim_command('edit ' .. testfilename)
nvim_command('mark a')