aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2015-07-07 23:49:22 +0300
committerZyX <kp-pav@yandex.ru>2015-10-08 22:00:09 +0300
commit1d3823a5c9c7b7494966d4e0851e2c1decbed76c (patch)
treebb1c55526b3e84adcbc04095d05e3c7269c84177 /test
parentf43a5e692647de81a692e537f1e748667ff84fb4 (diff)
downloadrneovim-1d3823a5c9c7b7494966d4e0851e2c1decbed76c.tar.gz
rneovim-1d3823a5c9c7b7494966d4e0851e2c1decbed76c.tar.bz2
rneovim-1d3823a5c9c7b7494966d4e0851e2c1decbed76c.zip
shada: Populate v:oldfiles
Diffstat (limited to 'test')
-rw-r--r--test/functional/shada/marks_spec.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/functional/shada/marks_spec.lua b/test/functional/shada/marks_spec.lua
index b69477b6ed..4909ae608e 100644
--- a/test/functional/shada/marks_spec.lua
+++ b/test/functional/shada/marks_spec.lua
@@ -95,6 +95,21 @@ describe('ShaDa support code', function()
eq(2, nvim_current_line())
end)
+ it('is able to populate v:oldfiles', function()
+ nvim_command('edit ' .. testfilename)
+ local tf_full = nvim_eval('fnamemodify(bufname("%"), ":p")')
+ nvim_command('edit ' .. testfilename_2)
+ local tf_full_2 = nvim_eval('fnamemodify(bufname("%"), ":p")')
+ nvim_command('qall')
+ reset()
+ local oldfiles = nvim('get_vvar', 'oldfiles')
+ eq(2, #oldfiles)
+ eq(testfilename, oldfiles[1]:sub(-#testfilename))
+ eq(testfilename_2, oldfiles[2]:sub(-#testfilename_2))
+ eq(tf_full, oldfiles[1])
+ eq(tf_full_2, oldfiles[2])
+ end)
+
it('is able to dump and restore jump list', function()
nvim_command('edit ' .. testfilename_2)
nvim_feed('G')