diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/shada/marks_spec.lua | 26 | ||||
-rw-r--r-- | test/functional/shada/merging_spec.lua | 13 |
2 files changed, 13 insertions, 26 deletions
diff --git a/test/functional/shada/marks_spec.lua b/test/functional/shada/marks_spec.lua index 8b9e70045c..dc7a710143 100644 --- a/test/functional/shada/marks_spec.lua +++ b/test/functional/shada/marks_spec.lua @@ -118,28 +118,14 @@ describe('ShaDa support code', function() nvim_command('edit ' .. testfilename) nvim_feed('G') nvim_feed('gg') - -- nvim_command('redir! >/tmp/jumps.last | jumps | redir END') - -- nvim_command('wshada /tmp/foo') + nvim_command('enew') + nvim_feed('gg') + nvim_command('redir => g:jumps | jumps | redir END') + local saved = nvim_eval('g:jumps') nvim_command('qall') reset() - nvim_command('redraw') - -- nvim_command('redir! >/tmp/jumps.init | jumps | redir END') - nvim_command('edit ' .. testfilename) - -- nvim_command('redir! >/tmp/jumps | jumps | redir END') - eq(testfilename, nvim_eval('bufname("%")')) - eq(1, nvim_current_line()) - nvim_command('execute "normal! \\<C-o>"') - eq(testfilename, nvim_eval('bufname("%")')) - eq(1, nvim_current_line()) - nvim_command('execute "normal! \\<C-o>"') - eq(testfilename, nvim_eval('bufname("%")')) - eq(2, nvim_current_line()) - nvim_command('execute "normal! \\<C-o>"') - eq(testfilename_2, nvim_eval('bufname("%")')) - eq(1, nvim_current_line()) - nvim_command('execute "normal! \\<C-o>"') - eq(testfilename_2, nvim_eval('bufname("%")')) - eq(2, nvim_current_line()) + nvim_command('redir => g:jumps | jumps | redir END') + eq(saved, nvim_eval('g:jumps')) end) it('is able to dump and restore jump list with different times (slow!)', diff --git a/test/functional/shada/merging_spec.lua b/test/functional/shada/merging_spec.lua index e627f8f76e..3daa5af7c2 100644 --- a/test/functional/shada/merging_spec.lua +++ b/test/functional/shada/merging_spec.lua @@ -772,12 +772,13 @@ describe('ShaDa jumps support code', function() eq('', nvim_eval('bufname("%")')) eq('\n' .. ' jump line col file/text\n' - .. ' 5 2 0 /a/b/c\n' + .. ' 6 2 0 /a/b/c\n' + .. ' 5 2 0 /a/b/d\n' .. ' 4 3 0 /a/b/d\n' - .. ' 3 2 0 /a/b/d\n' + .. ' 3 2 0 /a/b/e\n' .. ' 2 2 0 /a/b/f\n' - .. ' 1 2 0 /a/b/e\n' - .. '> 0 1 0 ', nvim_eval('g:jumps')) + .. ' 1 1 0 \n' + .. '>', nvim_eval('g:jumps')) end) it('merges jumps when writing', function() @@ -791,10 +792,10 @@ describe('ShaDa jumps support code', function() eq(0, exc_exec('wshada ' .. shada_fname)) local jumps = { {file='/a/b/c', line=2}, - {file='/a/b/d', line=3}, {file='/a/b/d', line=2}, - {file='/a/b/f', line=2}, + {file='/a/b/d', line=3}, {file='/a/b/e', line=2}, + {file='/a/b/f', line=2}, } local found = 0 for _, v in ipairs(read_shada_file(shada_fname)) do |