diff options
author | Lewis Russell <lewis6991@gmail.com> | 2024-01-12 17:59:57 +0000 |
---|---|---|
committer | Lewis Russell <lewis6991@gmail.com> | 2024-01-12 18:59:14 +0000 |
commit | 795f896a5772d5e0795f86642bdf90c82efac45c (patch) | |
tree | 308f04fbee18d2ec3f00c12a8bec96b84d8907f0 /test/functional/shada/marks_spec.lua | |
parent | 4f81f506f96f8b5bfcf00e952ceb492d3ce9dc6e (diff) | |
download | rneovim-795f896a5772d5e0795f86642bdf90c82efac45c.tar.gz rneovim-795f896a5772d5e0795f86642bdf90c82efac45c.tar.bz2 rneovim-795f896a5772d5e0795f86642bdf90c82efac45c.zip |
test: rename (meths, funcs) -> (api, fn)
Diffstat (limited to 'test/functional/shada/marks_spec.lua')
-rw-r--r-- | test/functional/shada/marks_spec.lua | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/test/functional/shada/marks_spec.lua b/test/functional/shada/marks_spec.lua index 0850084d98..3f29a02506 100644 --- a/test/functional/shada/marks_spec.lua +++ b/test/functional/shada/marks_spec.lua @@ -1,6 +1,6 @@ -- ShaDa marks saving/reading support local helpers = require('test.functional.helpers')(after_each) -local meths, nvim_command, funcs, eq = helpers.meths, helpers.command, helpers.funcs, helpers.eq +local api, nvim_command, fn, eq = helpers.api, helpers.command, helpers.fn, helpers.eq local feed = helpers.feed local exc_exec, exec_capture = helpers.exc_exec, helpers.exec_capture local expect_exit = helpers.expect_exit @@ -9,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 meths.nvim_win_get_cursor(0)[1] + return api.nvim_win_get_cursor(0)[1] end describe('ShaDa support code', function() @@ -43,7 +43,7 @@ describe('ShaDa support code', function() reset() nvim_command('rshada') nvim_command('normal! `A') - eq(testfilename, funcs.fnamemodify(meths.nvim_buf_get_name(0), ':t')) + eq(testfilename, fn.fnamemodify(api.nvim_buf_get_name(0), ':t')) eq(1, nvim_current_line()) nvim_command('normal! `B') eq(2, nvim_current_line()) @@ -70,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(meths.nvim_buf_get_name(0), ':t')) + eq(testfilename, fn.fnamemodify(api.nvim_buf_get_name(0), ':t')) eq(1, nvim_current_line()) end) @@ -83,7 +83,7 @@ describe('ShaDa support code', function() reset() nvim_command('edit ' .. testfilename) nvim_command('normal! `a') - eq(testfilename, funcs.fnamemodify(meths.nvim_buf_get_name(0), ':t')) + eq(testfilename, fn.fnamemodify(api.nvim_buf_get_name(0), ':t')) eq(1, nvim_current_line()) nvim_command('normal! `b') eq(2, nvim_current_line()) @@ -113,12 +113,12 @@ describe('ShaDa support code', function() it('is able to populate v:oldfiles', function() nvim_command('edit ' .. testfilename) - local tf_full = meths.nvim_buf_get_name(0) + local tf_full = api.nvim_buf_get_name(0) nvim_command('edit ' .. testfilename_2) - local tf_full_2 = meths.nvim_buf_get_name(0) + local tf_full_2 = api.nvim_buf_get_name(0) expect_exit(nvim_command, 'qall') reset() - local oldfiles = meths.nvim_get_vvar('oldfiles') + local oldfiles = api.nvim_get_vvar('oldfiles') table.sort(oldfiles) eq(2, #oldfiles) eq(testfilename, oldfiles[1]:sub(-#testfilename)) @@ -126,7 +126,7 @@ describe('ShaDa support code', function() eq(tf_full, oldfiles[1]) eq(tf_full_2, oldfiles[2]) nvim_command('rshada!') - oldfiles = meths.nvim_get_vvar('oldfiles') + oldfiles = api.nvim_get_vvar('oldfiles') table.sort(oldfiles) eq(2, #oldfiles) eq(testfilename, oldfiles[1]:sub(-#testfilename)) @@ -159,8 +159,8 @@ describe('ShaDa support code', function() nvim_command('quit') nvim_command('rshada') nvim_command('normal! \15') -- <C-o> - eq(testfilename_2, funcs.bufname('%')) - eq({ 2, 0 }, meths.nvim_win_get_cursor(0)) + eq(testfilename_2, fn.bufname('%')) + eq({ 2, 0 }, api.nvim_win_get_cursor(0)) end) it('is able to dump and restore jump list with different times (slow!)', function() @@ -179,19 +179,19 @@ describe('ShaDa support code', function() reset() nvim_command('redraw') nvim_command('edit ' .. testfilename) - eq(testfilename, funcs.bufname('%')) + eq(testfilename, fn.bufname('%')) eq(1, nvim_current_line()) nvim_command('execute "normal! \\<C-o>"') - eq(testfilename, funcs.bufname('%')) + eq(testfilename, fn.bufname('%')) eq(2, nvim_current_line()) nvim_command('execute "normal! \\<C-o>"') - eq(testfilename_2, funcs.bufname('%')) + eq(testfilename_2, fn.bufname('%')) eq(1, nvim_current_line()) nvim_command('execute "normal! \\<C-o>"') - eq(testfilename_2, funcs.bufname('%')) + eq(testfilename_2, fn.bufname('%')) eq(2, nvim_current_line()) nvim_command('execute "normal! \\<C-o>"') - eq(testfilename_2, funcs.bufname('%')) + eq(testfilename_2, fn.bufname('%')) eq(2, nvim_current_line()) end) @@ -223,14 +223,14 @@ describe('ShaDa support code', function() }, args = { '-i', - meths.nvim_get_var('tmpname'), -- Use same shada file as parent. + api.nvim_get_var('tmpname'), -- Use same shada file as parent. '--cmd', 'silent edit ' .. non_existent_testfilename, '-c', 'qall', }, } - eq('', funcs.system(argv)) + eq('', fn.system(argv)) eq(0, exc_exec('rshada')) end) @@ -242,14 +242,14 @@ describe('ShaDa support code', function() }, args = { '-i', - meths.nvim_get_var('tmpname'), -- Use same shada file as parent. + api.nvim_get_var('tmpname'), -- Use same shada file as parent. '-c', 'silent edit ' .. non_existent_testfilename, '-c', 'autocmd VimEnter * qall', }, } - eq('', funcs.system(argv)) + eq('', fn.system(argv)) eq(0, exc_exec('rshada')) end) |