mirror of
https://github.com/neovim/neovim.git
synced 2025-10-10 03:46:31 +00:00
shada: Populate v:oldfiles
This commit is contained in:
@@ -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')
|
||||
|
Reference in New Issue
Block a user