aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2024-01-12 17:59:57 +0000
committerLewis Russell <lewis6991@gmail.com>2024-01-12 18:59:14 +0000
commit795f896a5772d5e0795f86642bdf90c82efac45c (patch)
tree308f04fbee18d2ec3f00c12a8bec96b84d8907f0 /test/functional/legacy
parent4f81f506f96f8b5bfcf00e952ceb492d3ce9dc6e (diff)
downloadrneovim-795f896a5772d5e0795f86642bdf90c82efac45c.tar.gz
rneovim-795f896a5772d5e0795f86642bdf90c82efac45c.tar.bz2
rneovim-795f896a5772d5e0795f86642bdf90c82efac45c.zip
test: rename (meths, funcs) -> (api, fn)
Diffstat (limited to 'test/functional/legacy')
-rw-r--r--test/functional/legacy/012_directory_spec.lua18
-rw-r--r--test/functional/legacy/039_visual_block_mode_commands_spec.lua2
-rw-r--r--test/functional/legacy/assert_spec.lua2
-rw-r--r--test/functional/legacy/autochdir_spec.lua4
-rw-r--r--test/functional/legacy/autocmd_option_spec.lua12
-rw-r--r--test/functional/legacy/buffer_spec.lua8
-rw-r--r--test/functional/legacy/cmdline_spec.lua16
-rw-r--r--test/functional/legacy/ex_mode_spec.lua4
-rw-r--r--test/functional/legacy/excmd_spec.lua8
-rw-r--r--test/functional/legacy/filechanged_spec.lua10
-rw-r--r--test/functional/legacy/fnamemodify_spec.lua2
-rw-r--r--test/functional/legacy/increment_spec.lua2
-rw-r--r--test/functional/legacy/mapping_spec.lua14
-rw-r--r--test/functional/legacy/messages_spec.lua8
-rw-r--r--test/functional/legacy/mksession_spec.lua6
-rw-r--r--test/functional/legacy/move_spec.lua4
-rw-r--r--test/functional/legacy/prompt_buffer_spec.lua20
-rw-r--r--test/functional/legacy/put_spec.lua4
-rw-r--r--test/functional/legacy/search_spec.lua20
-rw-r--r--test/functional/legacy/undolevels_spec.lua2
-rw-r--r--test/functional/legacy/vimscript_spec.lua4
21 files changed, 85 insertions, 85 deletions
diff --git a/test/functional/legacy/012_directory_spec.lua b/test/functional/legacy/012_directory_spec.lua
index 368ab382c0..b428318e3f 100644
--- a/test/functional/legacy/012_directory_spec.lua
+++ b/test/functional/legacy/012_directory_spec.lua
@@ -8,8 +8,8 @@ local helpers = require('test.functional.helpers')(after_each)
local eq = helpers.eq
local neq = helpers.neq
local poke_eventloop = helpers.poke_eventloop
-local funcs = helpers.funcs
-local meths = helpers.meths
+local fn = helpers.fn
+local api = helpers.api
local clear = helpers.clear
local insert = helpers.insert
local command = helpers.command
@@ -56,21 +56,21 @@ describe("'directory' option", function()
line 3 Abcdefghij
end of testfile]])
- meths.nvim_set_option_value('swapfile', true, {})
- meths.nvim_set_option_value('swapfile', true, {})
- meths.nvim_set_option_value('directory', '.', {})
+ api.nvim_set_option_value('swapfile', true, {})
+ api.nvim_set_option_value('swapfile', true, {})
+ api.nvim_set_option_value('directory', '.', {})
-- sanity check: files should not exist yet.
eq(nil, vim.uv.fs_stat('.Xtest1.swp'))
command('edit! Xtest1')
poke_eventloop()
- eq('Xtest1', funcs.buffer_name('%'))
+ eq('Xtest1', fn.buffer_name('%'))
-- Verify that the swapfile exists. In the legacy test this was done by
-- reading the output from :!ls.
neq(nil, vim.uv.fs_stat('.Xtest1.swp'))
- meths.nvim_set_option_value('directory', './Xtest2,.', {})
+ api.nvim_set_option_value('directory', './Xtest2,.', {})
command('edit Xtest1')
poke_eventloop()
@@ -79,10 +79,10 @@ describe("'directory' option", function()
eq({ 'Xtest1.swp', 'Xtest3' }, ls_dir_sorted('Xtest2'))
- meths.nvim_set_option_value('directory', 'Xtest.je', {})
+ api.nvim_set_option_value('directory', 'Xtest.je', {})
command('bdelete')
command('edit Xtest2/Xtest3')
- eq(true, meths.nvim_get_option_value('swapfile', {}))
+ eq(true, api.nvim_get_option_value('swapfile', {}))
poke_eventloop()
eq({ 'Xtest3' }, ls_dir_sorted('Xtest2'))
diff --git a/test/functional/legacy/039_visual_block_mode_commands_spec.lua b/test/functional/legacy/039_visual_block_mode_commands_spec.lua
index 5387883570..626035d74c 100644
--- a/test/functional/legacy/039_visual_block_mode_commands_spec.lua
+++ b/test/functional/legacy/039_visual_block_mode_commands_spec.lua
@@ -2,7 +2,7 @@
-- And test "U" in Visual mode, also on German sharp S.
local helpers = require('test.functional.helpers')(after_each)
-local nvim, eq = helpers.meths, helpers.eq
+local nvim, eq = helpers.api, helpers.eq
local insert, feed = helpers.insert, helpers.feed
local clear, expect = helpers.clear, helpers.expect
local feed_command = helpers.feed_command
diff --git a/test/functional/legacy/assert_spec.lua b/test/functional/legacy/assert_spec.lua
index 038bdd48f2..04c90281a7 100644
--- a/test/functional/legacy/assert_spec.lua
+++ b/test/functional/legacy/assert_spec.lua
@@ -1,5 +1,5 @@
local helpers = require('test.functional.helpers')(after_each)
-local nvim, call = helpers.meths, helpers.call
+local nvim, call = helpers.api, helpers.call
local clear, eq = helpers.clear, helpers.eq
local source, command = helpers.source, helpers.command
local exc_exec = helpers.exc_exec
diff --git a/test/functional/legacy/autochdir_spec.lua b/test/functional/legacy/autochdir_spec.lua
index aca7ba9b39..e5980f5942 100644
--- a/test/functional/legacy/autochdir_spec.lua
+++ b/test/functional/legacy/autochdir_spec.lua
@@ -1,11 +1,11 @@
local helpers = require('test.functional.helpers')(after_each)
local clear, eq, matches = helpers.clear, helpers.eq, helpers.matches
-local eval, command, call, meths = helpers.eval, helpers.command, helpers.call, helpers.meths
+local eval, command, call, api = helpers.eval, helpers.command, helpers.call, helpers.api
local source, exec_capture = helpers.source, helpers.exec_capture
local mkdir = helpers.mkdir
local function expected_empty()
- eq({}, meths.nvim_get_vvar('errors'))
+ eq({}, api.nvim_get_vvar('errors'))
end
describe('autochdir behavior', function()
diff --git a/test/functional/legacy/autocmd_option_spec.lua b/test/functional/legacy/autocmd_option_spec.lua
index d2c41043ac..9966df263b 100644
--- a/test/functional/legacy/autocmd_option_spec.lua
+++ b/test/functional/legacy/autocmd_option_spec.lua
@@ -1,9 +1,9 @@
local helpers = require('test.functional.helpers')(after_each)
-local nvim = helpers.meths
+local nvim = helpers.api
local clear, eq, neq, eval = helpers.clear, helpers.eq, helpers.neq, helpers.eval
-local meths = helpers.meths
-local curbuf = helpers.meths.nvim_get_current_buf
-local curwin = helpers.meths.nvim_get_current_win
+local api = helpers.api
+local curbuf = helpers.api.nvim_get_current_buf
+local curwin = helpers.api.nvim_get_current_win
local exec_capture = helpers.exec_capture
local source, command = helpers.source, helpers.command
@@ -211,7 +211,7 @@ describe('au OptionSet', function()
it('should trigger if the current buffer is different from the targeted buffer', function()
local new_buffer = make_buffer()
- local new_bufnr = meths.nvim_buf_get_number(new_buffer)
+ local new_bufnr = api.nvim_buf_get_number(new_buffer)
command('call setbufvar(' .. new_bufnr .. ', "&buftype", "nofile")')
expected_combination({
@@ -648,7 +648,7 @@ describe('au OptionSet', function()
set_hook('buftype')
local new_buffer = make_buffer()
- local new_bufnr = meths.nvim_buf_get_number(new_buffer)
+ local new_bufnr = api.nvim_buf_get_number(new_buffer)
command('call setbufvar(' .. new_bufnr .. ', "&buftype", "nofile")')
expected_combination({
diff --git a/test/functional/legacy/buffer_spec.lua b/test/functional/legacy/buffer_spec.lua
index 605cd72bf6..b3964540f0 100644
--- a/test/functional/legacy/buffer_spec.lua
+++ b/test/functional/legacy/buffer_spec.lua
@@ -1,16 +1,16 @@
local helpers = require('test.functional.helpers')(after_each)
local clear, source = helpers.clear, helpers.source
-local call, eq, meths = helpers.call, helpers.eq, helpers.meths
+local call, eq, api = helpers.call, helpers.eq, helpers.api
local function expected_empty()
- eq({}, meths.nvim_get_vvar('errors'))
+ eq({}, api.nvim_get_vvar('errors'))
end
describe('buffer', function()
before_each(function()
clear()
- meths.nvim_ui_attach(80, 24, {})
- meths.nvim_set_option_value('hidden', false, {})
+ api.nvim_ui_attach(80, 24, {})
+ api.nvim_set_option_value('hidden', false, {})
end)
it('deleting a modified buffer with :confirm', function()
diff --git a/test/functional/legacy/cmdline_spec.lua b/test/functional/legacy/cmdline_spec.lua
index ea6d8409ba..8c94451f9a 100644
--- a/test/functional/legacy/cmdline_spec.lua
+++ b/test/functional/legacy/cmdline_spec.lua
@@ -5,7 +5,7 @@ local command = helpers.command
local feed = helpers.feed
local feed_command = helpers.feed_command
local exec = helpers.exec
-local meths = helpers.meths
+local api = helpers.api
local pesc = vim.pesc
describe('cmdline', function()
@@ -198,9 +198,9 @@ describe('cmdline', function()
[3] = { reverse = true }, -- TabLineFill
})
screen:attach()
- meths.nvim_set_option_value('laststatus', 2, {})
- meths.nvim_set_option_value('showtabline', 2, {})
- meths.nvim_set_option_value('cmdheight', 1, {})
+ api.nvim_set_option_value('laststatus', 2, {})
+ api.nvim_set_option_value('showtabline', 2, {})
+ api.nvim_set_option_value('cmdheight', 1, {})
screen:expect([[
{2: [No Name] }{3: }|
^ |
@@ -217,10 +217,10 @@ describe('cmdline', function()
[0] = { bold = true, foreground = Screen.colors.Blue }, -- NonText
}
screen:attach()
- meths.nvim_set_option_value('ruler', true, {})
- meths.nvim_set_option_value('rulerformat', 'longish', {})
- meths.nvim_set_option_value('laststatus', 0, {})
- meths.nvim_set_option_value('winwidth', 1, {})
+ api.nvim_set_option_value('ruler', true, {})
+ api.nvim_set_option_value('rulerformat', 'longish', {})
+ api.nvim_set_option_value('laststatus', 0, {})
+ api.nvim_set_option_value('winwidth', 1, {})
feed [[<C-W>v<C-W>|<C-W>p]]
screen:expect [[
│^ |
diff --git a/test/functional/legacy/ex_mode_spec.lua b/test/functional/legacy/ex_mode_spec.lua
index 85057938e3..ae4c4309d1 100644
--- a/test/functional/legacy/ex_mode_spec.lua
+++ b/test/functional/legacy/ex_mode_spec.lua
@@ -5,7 +5,7 @@ local command = helpers.command
local eq = helpers.eq
local eval = helpers.eval
local feed = helpers.feed
-local meths = helpers.meths
+local api = helpers.api
local poke_eventloop = helpers.poke_eventloop
before_each(clear)
@@ -16,7 +16,7 @@ describe('Ex mode', function()
feed('gQ' .. cmd .. '<C-b>"<CR>')
local ret = eval('@:[1:]') -- Remove leading quote.
feed('visual<CR>')
- eq(meths.nvim_replace_termcodes(expected, true, true, true), ret)
+ eq(api.nvim_replace_termcodes(expected, true, true, true), ret)
end
command('set sw=2')
test_ex_edit('bar', 'foo bar<C-u>bar')
diff --git a/test/functional/legacy/excmd_spec.lua b/test/functional/legacy/excmd_spec.lua
index 160be8acd1..41f14c4645 100644
--- a/test/functional/legacy/excmd_spec.lua
+++ b/test/functional/legacy/excmd_spec.lua
@@ -6,8 +6,8 @@ local exec = helpers.exec
local exec_lua = helpers.exec_lua
local expect_exit = helpers.expect_exit
local feed = helpers.feed
-local funcs = helpers.funcs
-local meths = helpers.meths
+local fn = helpers.fn
+local api = helpers.api
local read_file = helpers.read_file
local source = helpers.source
local eq = helpers.eq
@@ -24,7 +24,7 @@ end
describe('Ex command', function()
before_each(clear)
after_each(function()
- eq({}, meths.nvim_get_vvar('errors'))
+ eq({}, api.nvim_get_vvar('errors'))
end)
it('checks for address line overflow', function()
@@ -340,7 +340,7 @@ describe(':confirm command dialog', function()
feed('<CR>') -- suppress hit-enter prompt
-- Try to write with read-only file permissions.
- funcs.setfperm('Xconfirm_write_ro', 'r--r--r--')
+ fn.setfperm('Xconfirm_write_ro', 'r--r--r--')
feed(':set noro | silent undo | confirm w\n')
screen:expect([[
foobar |
diff --git a/test/functional/legacy/filechanged_spec.lua b/test/functional/legacy/filechanged_spec.lua
index 0a088772a5..46ecfdcd63 100644
--- a/test/functional/legacy/filechanged_spec.lua
+++ b/test/functional/legacy/filechanged_spec.lua
@@ -1,19 +1,19 @@
local helpers = require('test.functional.helpers')(after_each)
local clear, source = helpers.clear, helpers.source
-local call, eq, meths = helpers.call, helpers.eq, helpers.meths
+local call, eq, api = helpers.call, helpers.eq, helpers.api
local is_os = helpers.is_os
local skip = helpers.skip
local function expected_empty()
- eq({}, meths.nvim_get_vvar('errors'))
+ eq({}, api.nvim_get_vvar('errors'))
end
describe('file changed dialog', function()
before_each(function()
clear()
- meths.nvim_ui_attach(80, 24, {})
- meths.nvim_set_option_value('autoread', false, {})
- meths.nvim_set_option_value('fsync', true, {})
+ api.nvim_ui_attach(80, 24, {})
+ api.nvim_set_option_value('autoread', false, {})
+ api.nvim_set_option_value('fsync', true, {})
end)
it('works', function()
diff --git a/test/functional/legacy/fnamemodify_spec.lua b/test/functional/legacy/fnamemodify_spec.lua
index c6beb6d7df..570b523d92 100644
--- a/test/functional/legacy/fnamemodify_spec.lua
+++ b/test/functional/legacy/fnamemodify_spec.lua
@@ -2,7 +2,7 @@
local helpers = require('test.functional.helpers')(after_each)
local clear, source = helpers.clear, helpers.source
-local call, eq, nvim = helpers.call, helpers.eq, helpers.meths
+local call, eq, nvim = helpers.call, helpers.eq, helpers.api
local function expected_empty()
eq({}, nvim.nvim_get_vvar('errors'))
diff --git a/test/functional/legacy/increment_spec.lua b/test/functional/legacy/increment_spec.lua
index 9e19841375..a81044114c 100644
--- a/test/functional/legacy/increment_spec.lua
+++ b/test/functional/legacy/increment_spec.lua
@@ -3,7 +3,7 @@
local helpers = require('test.functional.helpers')(after_each)
local source, command = helpers.source, helpers.command
local call, clear = helpers.call, helpers.clear
-local eq, nvim = helpers.eq, helpers.meths
+local eq, nvim = helpers.eq, helpers.api
describe('Ctrl-A/Ctrl-X on visual selections', function()
before_each(function()
diff --git a/test/functional/legacy/mapping_spec.lua b/test/functional/legacy/mapping_spec.lua
index 7058e70c4f..9eddec40f7 100644
--- a/test/functional/legacy/mapping_spec.lua
+++ b/test/functional/legacy/mapping_spec.lua
@@ -3,7 +3,7 @@
local helpers = require('test.functional.helpers')(after_each)
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
local expect, poke_eventloop = helpers.expect, helpers.poke_eventloop
-local command, eq, eval, meths = helpers.command, helpers.eq, helpers.eval, helpers.meths
+local command, eq, eval, api = helpers.command, helpers.eq, helpers.eval, helpers.api
local sleep = vim.uv.sleep
describe('mapping', function()
@@ -134,9 +134,9 @@ describe('mapping', function()
command('nnoremap <LeftDrag> <LeftDrag><Cmd><CR>')
poke_eventloop()
- meths.nvim_input_mouse('left', 'press', '', 0, 0, 0)
+ api.nvim_input_mouse('left', 'press', '', 0, 0, 0)
poke_eventloop()
- meths.nvim_input_mouse('left', 'drag', '', 0, 0, 1)
+ api.nvim_input_mouse('left', 'drag', '', 0, 0, 1)
poke_eventloop()
eq('s', eval('mode()'))
end)
@@ -147,9 +147,9 @@ describe('mapping', function()
command('inoremap <LeftDrag> <LeftDrag><Cmd>let g:dragged = 1<CR>')
feed('i')
poke_eventloop()
- meths.nvim_input_mouse('left', 'press', '', 0, 0, 0)
+ api.nvim_input_mouse('left', 'press', '', 0, 0, 0)
poke_eventloop()
- meths.nvim_input_mouse('left', 'drag', '', 0, 0, 1)
+ api.nvim_input_mouse('left', 'drag', '', 0, 0, 1)
poke_eventloop()
eq(1, eval('g:dragged'))
eq('v', eval('mode()'))
@@ -158,9 +158,9 @@ describe('mapping', function()
command([[inoremap <LeftDrag> <LeftDrag><C-\><C-N>]])
feed('i')
poke_eventloop()
- meths.nvim_input_mouse('left', 'press', '', 0, 0, 0)
+ api.nvim_input_mouse('left', 'press', '', 0, 0, 0)
poke_eventloop()
- meths.nvim_input_mouse('left', 'drag', '', 0, 0, 1)
+ api.nvim_input_mouse('left', 'drag', '', 0, 0, 1)
poke_eventloop()
eq('n', eval('mode()'))
end)
diff --git a/test/functional/legacy/messages_spec.lua b/test/functional/legacy/messages_spec.lua
index c416ebfc99..593d03fa90 100644
--- a/test/functional/legacy/messages_spec.lua
+++ b/test/functional/legacy/messages_spec.lua
@@ -4,7 +4,7 @@ local clear = helpers.clear
local command = helpers.command
local exec = helpers.exec
local feed = helpers.feed
-local meths = helpers.meths
+local api = helpers.api
local nvim_dir = helpers.nvim_dir
local assert_alive = helpers.assert_alive
@@ -410,9 +410,9 @@ describe('messages', function()
screen:attach()
command('cd ' .. nvim_dir)
- meths.nvim_set_option_value('shell', './shell-test', {})
- meths.nvim_set_option_value('shellcmdflag', 'REP 20', {})
- meths.nvim_set_option_value('shellxquote', '', {}) -- win: avoid extra quotes
+ api.nvim_set_option_value('shell', './shell-test', {})
+ api.nvim_set_option_value('shellcmdflag', 'REP 20', {})
+ api.nvim_set_option_value('shellxquote', '', {}) -- win: avoid extra quotes
-- display a page and go back, results in exactly the same view
feed([[:4 verbose echo system('foo')<CR>]])
diff --git a/test/functional/legacy/mksession_spec.lua b/test/functional/legacy/mksession_spec.lua
index bca9cd833c..689d918cd9 100644
--- a/test/functional/legacy/mksession_spec.lua
+++ b/test/functional/legacy/mksession_spec.lua
@@ -1,7 +1,7 @@
local helpers = require('test.functional.helpers')(after_each)
local clear = helpers.clear
local command = helpers.command
-local funcs = helpers.funcs
+local fn = helpers.fn
local eq = helpers.eq
describe('mksession', function()
@@ -18,7 +18,7 @@ describe('mksession', function()
command('mksession! Xtest_mks.out')
local found_rtp = 0
local found_pp = 0
- for _, line in pairs(funcs.readfile('Xtest_mks.out', 'b')) do
+ for _, line in pairs(fn.readfile('Xtest_mks.out', 'b')) do
if line:find('set runtimepath') then
found_rtp = found_rtp + 1
end
@@ -32,7 +32,7 @@ describe('mksession', function()
command('set sessionoptions+=skiprtp')
command('mksession! Xtest_mks.out')
local found_rtp_or_pp = 0
- for _, line in pairs(funcs.readfile('Xtest_mks.out', 'b')) do
+ for _, line in pairs(fn.readfile('Xtest_mks.out', 'b')) do
if line:find('set runtimepath') or line:find('set packpath') then
found_rtp_or_pp = found_rtp_or_pp + 1
end
diff --git a/test/functional/legacy/move_spec.lua b/test/functional/legacy/move_spec.lua
index 512823be6c..1500d48ad9 100644
--- a/test/functional/legacy/move_spec.lua
+++ b/test/functional/legacy/move_spec.lua
@@ -2,7 +2,7 @@ local helpers = require('test.functional.helpers')(after_each)
local Screen = require('test.functional.ui.screen')
local clear = helpers.clear
local feed = helpers.feed
-local funcs = helpers.funcs
+local fn = helpers.fn
before_each(clear)
@@ -15,7 +15,7 @@ describe(':move', function()
})
screen:attach()
- funcs.setline(1, { 'First', 'Second', 'Third', 'Fourth' })
+ fn.setline(1, { 'First', 'Second', 'Third', 'Fourth' })
feed('gg:move +1<CR>')
screen:expect([[
Second |
diff --git a/test/functional/legacy/prompt_buffer_spec.lua b/test/functional/legacy/prompt_buffer_spec.lua
index e372d713c4..0c6898526e 100644
--- a/test/functional/legacy/prompt_buffer_spec.lua
+++ b/test/functional/legacy/prompt_buffer_spec.lua
@@ -5,7 +5,7 @@ local source = helpers.source
local clear = helpers.clear
local command = helpers.command
local poke_eventloop = helpers.poke_eventloop
-local meths = helpers.meths
+local api = helpers.api
local eq = helpers.eq
local neq = helpers.neq
@@ -180,12 +180,12 @@ describe('prompt buffer', function()
call timer_start(0, {-> nvim_buf_set_lines(s:buf, -1, -1, 0, ['walrus'])})
]]
poke_eventloop()
- eq({ mode = 'i', blocking = false }, meths.nvim_get_mode())
+ eq({ mode = 'i', blocking = false }, api.nvim_get_mode())
end)
-- oldtest: Test_prompt_appending_while_hidden()
it('accessing hidden prompt buffer does not start insert mode', function()
- local prev_win = meths.nvim_get_current_win()
+ local prev_win = api.nvim_get_current_win()
source([[
new prompt
set buftype=prompt
@@ -205,16 +205,16 @@ describe('prompt buffer', function()
endfunc
]])
feed('asomething<CR>')
- eq('something', meths.nvim_get_var('entered'))
- neq(prev_win, meths.nvim_get_current_win())
+ eq('something', api.nvim_get_var('entered'))
+ neq(prev_win, api.nvim_get_current_win())
feed('exit<CR>')
- eq(prev_win, meths.nvim_get_current_win())
- eq({ mode = 'n', blocking = false }, meths.nvim_get_mode())
+ eq(prev_win, api.nvim_get_current_win())
+ eq({ mode = 'n', blocking = false }, api.nvim_get_mode())
command('call DoAppend()')
- eq({ mode = 'n', blocking = false }, meths.nvim_get_mode())
+ eq({ mode = 'n', blocking = false }, api.nvim_get_mode())
feed('i')
- eq({ mode = 'i', blocking = false }, meths.nvim_get_mode())
+ eq({ mode = 'i', blocking = false }, api.nvim_get_mode())
command('call DoAppend()')
- eq({ mode = 'i', blocking = false }, meths.nvim_get_mode())
+ eq({ mode = 'i', blocking = false }, api.nvim_get_mode())
end)
end)
diff --git a/test/functional/legacy/put_spec.lua b/test/functional/legacy/put_spec.lua
index 1678d8f2d8..c78946d690 100644
--- a/test/functional/legacy/put_spec.lua
+++ b/test/functional/legacy/put_spec.lua
@@ -2,7 +2,7 @@ local helpers = require('test.functional.helpers')(after_each)
local Screen = require('test.functional.ui.screen')
local clear = helpers.clear
local exec_lua = helpers.exec_lua
-local meths = helpers.meths
+local api = helpers.api
local source = helpers.source
local eq = helpers.eq
@@ -16,7 +16,7 @@ end
describe('put', function()
before_each(clear)
after_each(function()
- eq({}, meths.nvim_get_vvar('errors'))
+ eq({}, api.nvim_get_vvar('errors'))
end)
it('very large count 64-bit', function()
diff --git a/test/functional/legacy/search_spec.lua b/test/functional/legacy/search_spec.lua
index 7ddf81cff8..70748c9d27 100644
--- a/test/functional/legacy/search_spec.lua
+++ b/test/functional/legacy/search_spec.lua
@@ -5,7 +5,7 @@ local command = helpers.command
local eq = helpers.eq
local eval = helpers.eval
local feed = helpers.feed
-local funcs = helpers.funcs
+local fn = helpers.fn
local poke_eventloop = helpers.poke_eventloop
local exec = helpers.exec
@@ -27,7 +27,7 @@ describe('search cmdline', function()
end)
local function tenlines()
- funcs.setline(1, {
+ fn.setline(1, {
' 1',
' 2 these',
' 3 the',
@@ -68,7 +68,7 @@ describe('search cmdline', function()
3 {inc:the} |
/the^ |
]])
- eq({ 0, 0, 0, 0 }, funcs.getpos('"'))
+ eq({ 0, 0, 0, 0 }, fn.getpos('"'))
feed('<C-G>')
screen:expect([[
3 the |
@@ -125,7 +125,7 @@ describe('search cmdline', function()
end,
}
feed('<CR>')
- eq({ 0, 0, 0, 0 }, funcs.getpos('"'))
+ eq({ 0, 0, 0, 0 }, fn.getpos('"'))
end
end
@@ -368,7 +368,7 @@ describe('search cmdline', function()
end)
it('can traverse matches in the same line with <C-G>/<C-T>', function()
- funcs.setline(1, { ' 1', ' 2 these', ' 3 the theother' })
+ fn.setline(1, { ' 1', ' 2 these', ' 3 the theother' })
command('1')
command('set incsearch')
@@ -465,7 +465,7 @@ describe('search cmdline', function()
coladd = 0,
skipcol = 0,
curswant = 4,
- }, funcs.winsaveview())
+ }, fn.winsaveview())
end)
it('restores original view after failed search', function()
@@ -500,14 +500,14 @@ describe('search cmdline', function()
coladd = 0,
skipcol = 0,
curswant = 0,
- }, funcs.winsaveview())
+ }, fn.winsaveview())
end)
-- oldtest: Test_search_cmdline4().
it("CTRL-G with 'incsearch' and ? goes in the right direction", function()
screen:try_resize(40, 4)
command('enew!')
- funcs.setline(1, { ' 1 the first', ' 2 the second', ' 3 the third' })
+ fn.setline(1, { ' 1 the first', ' 2 the second', ' 3 the third' })
command('set laststatus=0 shortmess+=s')
command('set incsearch')
command('$')
@@ -608,7 +608,7 @@ describe('search cmdline', function()
it('incsearch works with :sort', function()
screen:try_resize(20, 4)
command('set incsearch hlsearch scrolloff=0')
- funcs.setline(1, { 'another one 2', 'that one 3', 'the one 1' })
+ fn.setline(1, { 'another one 2', 'that one 3', 'the one 1' })
feed(':sort ni u /on')
screen:expect([[
@@ -624,7 +624,7 @@ describe('search cmdline', function()
it('incsearch works with :vimgrep family', function()
screen:try_resize(30, 4)
command('set incsearch hlsearch scrolloff=0')
- funcs.setline(1, { 'another one 2', 'that one 3', 'the one 1' })
+ fn.setline(1, { 'another one 2', 'that one 3', 'the one 1' })
feed(':vimgrep on')
screen:expect([[
diff --git a/test/functional/legacy/undolevels_spec.lua b/test/functional/legacy/undolevels_spec.lua
index a22cda27b6..e8badc6864 100644
--- a/test/functional/legacy/undolevels_spec.lua
+++ b/test/functional/legacy/undolevels_spec.lua
@@ -1,6 +1,6 @@
local helpers = require('test.functional.helpers')(after_each)
local source, clear = helpers.source, helpers.clear
-local eq, nvim = helpers.eq, helpers.meths
+local eq, nvim = helpers.eq, helpers.api
describe('undolevel', function()
setup(clear)
diff --git a/test/functional/legacy/vimscript_spec.lua b/test/functional/legacy/vimscript_spec.lua
index eb3c70ecc6..8b0a920a3e 100644
--- a/test/functional/legacy/vimscript_spec.lua
+++ b/test/functional/legacy/vimscript_spec.lua
@@ -3,7 +3,7 @@ local Screen = require('test.functional.ui.screen')
local clear = helpers.clear
local exec = helpers.exec
local feed = helpers.feed
-local meths = helpers.meths
+local api = helpers.api
before_each(clear)
@@ -12,7 +12,7 @@ describe('Vim script', function()
it('Error when if/for/while/try/function is nested too deep', function()
local screen = Screen.new(80, 24)
screen:attach()
- meths.nvim_set_option_value('laststatus', 2, {})
+ api.nvim_set_option_value('laststatus', 2, {})
exec([[
" Deep nesting of if ... endif
func Test1()