diff options
Diffstat (limited to 'test/functional/shada/marks_spec.lua')
-rw-r--r-- | test/functional/shada/marks_spec.lua | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/test/functional/shada/marks_spec.lua b/test/functional/shada/marks_spec.lua index b50df23be4..0850084d98 100644 --- a/test/functional/shada/marks_spec.lua +++ b/test/functional/shada/marks_spec.lua @@ -1,12 +1,6 @@ -- ShaDa marks saving/reading support local helpers = require('test.functional.helpers')(after_each) -local meths, curwinmeths, curbufmeths, nvim_command, funcs, eq = - helpers.meths, - helpers.curwinmeths, - helpers.curbufmeths, - helpers.command, - helpers.funcs, - helpers.eq +local meths, nvim_command, funcs, eq = helpers.meths, helpers.command, helpers.funcs, helpers.eq local feed = helpers.feed local exc_exec, exec_capture = helpers.exc_exec, helpers.exec_capture local expect_exit = helpers.expect_exit @@ -15,7 +9,7 @@ local shada_helpers = require('test.functional.shada.helpers') local reset, clear = shada_helpers.reset, shada_helpers.clear local nvim_current_line = function() - return curwinmeths.get_cursor()[1] + return meths.nvim_win_get_cursor(0)[1] end describe('ShaDa support code', function() @@ -49,7 +43,7 @@ describe('ShaDa support code', function() reset() nvim_command('rshada') nvim_command('normal! `A') - eq(testfilename, funcs.fnamemodify(curbufmeths.get_name(), ':t')) + eq(testfilename, funcs.fnamemodify(meths.nvim_buf_get_name(0), ':t')) eq(1, nvim_current_line()) nvim_command('normal! `B') eq(2, nvim_current_line()) @@ -76,7 +70,7 @@ describe('ShaDa support code', function() reset("set shada='0,f0") nvim_command('language C') nvim_command('normal! `A') - eq(testfilename, funcs.fnamemodify(curbufmeths.get_name(), ':t')) + eq(testfilename, funcs.fnamemodify(meths.nvim_buf_get_name(0), ':t')) eq(1, nvim_current_line()) end) @@ -89,7 +83,7 @@ describe('ShaDa support code', function() reset() nvim_command('edit ' .. testfilename) nvim_command('normal! `a') - eq(testfilename, funcs.fnamemodify(curbufmeths.get_name(), ':t')) + eq(testfilename, funcs.fnamemodify(meths.nvim_buf_get_name(0), ':t')) eq(1, nvim_current_line()) nvim_command('normal! `b') eq(2, nvim_current_line()) @@ -119,9 +113,9 @@ describe('ShaDa support code', function() it('is able to populate v:oldfiles', function() nvim_command('edit ' .. testfilename) - local tf_full = curbufmeths.get_name() + local tf_full = meths.nvim_buf_get_name(0) nvim_command('edit ' .. testfilename_2) - local tf_full_2 = curbufmeths.get_name() + local tf_full_2 = meths.nvim_buf_get_name(0) expect_exit(nvim_command, 'qall') reset() local oldfiles = meths.nvim_get_vvar('oldfiles') @@ -166,7 +160,7 @@ describe('ShaDa support code', function() nvim_command('rshada') nvim_command('normal! \15') -- <C-o> eq(testfilename_2, funcs.bufname('%')) - eq({ 2, 0 }, curwinmeths.get_cursor()) + eq({ 2, 0 }, meths.nvim_win_get_cursor(0)) end) it('is able to dump and restore jump list with different times (slow!)', function() |