aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
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')