aboutsummaryrefslogtreecommitdiff
path: root/test/functional/editor
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2024-01-12 12:44:54 +0000
committerLewis Russell <lewis6991@gmail.com>2024-01-12 13:01:06 +0000
commitc30f2e3182e3b50e7c03932027ac55edfc8ada4a (patch)
treeedf0a76dba282d946f67fe70fff8c6cbe28e7a82 /test/functional/editor
parent284e0ad26dd9de90c3a813dd1b357a425eca6bad (diff)
downloadrneovim-c30f2e3182e3b50e7c03932027ac55edfc8ada4a.tar.gz
rneovim-c30f2e3182e3b50e7c03932027ac55edfc8ada4a.tar.bz2
rneovim-c30f2e3182e3b50e7c03932027ac55edfc8ada4a.zip
test: typing for helpers.meths
Diffstat (limited to 'test/functional/editor')
-rw-r--r--test/functional/editor/K_spec.lua6
-rw-r--r--test/functional/editor/completion_spec.lua4
-rw-r--r--test/functional/editor/macro_spec.lua4
-rw-r--r--test/functional/editor/mark_spec.lua32
-rw-r--r--test/functional/editor/mode_cmdline_spec.lua2
-rw-r--r--test/functional/editor/tabpage_spec.lua16
6 files changed, 32 insertions, 32 deletions
diff --git a/test/functional/editor/K_spec.lua b/test/functional/editor/K_spec.lua
index 1107de7984..bb7bcb7ca6 100644
--- a/test/functional/editor/K_spec.lua
+++ b/test/functional/editor/K_spec.lua
@@ -61,9 +61,9 @@ describe('K', function()
end)
it('empty string falls back to :help #19298', function()
- meths.set_option_value('keywordprg', '', {})
- meths.buf_set_lines(0, 0, -1, true, { 'doesnotexist' })
+ meths.nvim_set_option_value('keywordprg', '', {})
+ meths.nvim_buf_set_lines(0, 0, -1, true, { 'doesnotexist' })
feed('K')
- eq('E149: Sorry, no help for doesnotexist', meths.get_vvar('errmsg'))
+ eq('E149: Sorry, no help for doesnotexist', meths.nvim_get_vvar('errmsg'))
end)
end)
diff --git a/test/functional/editor/completion_spec.lua b/test/functional/editor/completion_spec.lua
index c13222bd7a..2e1d36202d 100644
--- a/test/functional/editor/completion_spec.lua
+++ b/test/functional/editor/completion_spec.lua
@@ -883,8 +883,8 @@ describe('completion', function()
return ''
endfunction
]])
- meths.set_option_value('completeopt', 'menuone,noselect', {})
- meths.set_var('_complist', {
+ meths.nvim_set_option_value('completeopt', 'menuone,noselect', {})
+ meths.nvim_set_var('_complist', {
{
word = 0,
abbr = 1,
diff --git a/test/functional/editor/macro_spec.lua b/test/functional/editor/macro_spec.lua
index 421bd3ebb8..ceaa01344c 100644
--- a/test/functional/editor/macro_spec.lua
+++ b/test/functional/editor/macro_spec.lua
@@ -139,7 +139,7 @@ describe('immediately after a macro has finished executing,', function()
it('if the macro does not end with a <Nop> mapping', function()
feed('@asq') -- "q" from "s" mapping should start recording a macro instead of being no-op
- eq({ mode = 'n', blocking = false }, meths.get_mode())
+ eq({ mode = 'n', blocking = false }, meths.nvim_get_mode())
expect('')
eq('', eval('@a'))
end)
@@ -147,7 +147,7 @@ describe('immediately after a macro has finished executing,', function()
it('if the macro ends with a <Nop> mapping', function()
command('nnoremap 0 <Nop>')
feed('@asq') -- "q" from "s" mapping should start recording a macro instead of being no-op
- eq({ mode = 'n', blocking = false }, meths.get_mode())
+ eq({ mode = 'n', blocking = false }, meths.nvim_get_mode())
expect('')
eq('', eval('@a'))
end)
diff --git a/test/functional/editor/mark_spec.lua b/test/functional/editor/mark_spec.lua
index 67d8cc58ad..266b5194ee 100644
--- a/test/functional/editor/mark_spec.lua
+++ b/test/functional/editor/mark_spec.lua
@@ -10,7 +10,7 @@ local feed = helpers.feed
local write_file = helpers.write_file
local pcall_err = helpers.pcall_err
local cursor = function()
- return helpers.meths.win_get_cursor(0)
+ return helpers.meths.nvim_win_get_cursor(0)
end
describe('named marks', function()
@@ -105,7 +105,7 @@ describe('named marks', function()
feed('mA')
command('next')
feed("'A")
- eq(1, meths.get_current_buf().id)
+ eq(1, meths.nvim_get_current_buf().id)
eq({ 2, 0 }, cursor())
end)
@@ -118,7 +118,7 @@ describe('named marks', function()
feed('mA')
command('next')
feed('`A')
- eq(1, meths.get_current_buf().id)
+ eq(1, meths.nvim_get_current_buf().id)
eq({ 2, 2 }, cursor())
end)
@@ -131,7 +131,7 @@ describe('named marks', function()
feed('mA')
command('next')
feed("g'A")
- eq(1, meths.get_current_buf().id)
+ eq(1, meths.nvim_get_current_buf().id)
eq({ 2, 0 }, cursor())
end)
@@ -144,7 +144,7 @@ describe('named marks', function()
feed('mA')
command('next')
feed('g`A')
- eq(1, meths.get_current_buf().id)
+ eq(1, meths.nvim_get_current_buf().id)
eq({ 2, 2 }, cursor())
end)
@@ -158,7 +158,7 @@ describe('named marks', function()
feed('mA')
command('next')
command("'A")
- eq(1, meths.get_current_buf().id)
+ eq(1, meths.nvim_get_current_buf().id)
eq({ 2, 0 }, cursor())
end)
@@ -303,24 +303,24 @@ describe('named marks', function()
end)
it("getting '{ '} '( ') does not move cursor", function()
- meths.buf_set_lines(0, 0, 0, true, { 'aaaaa', 'bbbbb', 'ccccc', 'ddddd', 'eeeee' })
- meths.win_set_cursor(0, { 2, 0 })
+ meths.nvim_buf_set_lines(0, 0, 0, true, { 'aaaaa', 'bbbbb', 'ccccc', 'ddddd', 'eeeee' })
+ meths.nvim_win_set_cursor(0, { 2, 0 })
funcs.getpos("'{")
- eq({ 2, 0 }, meths.win_get_cursor(0))
+ eq({ 2, 0 }, meths.nvim_win_get_cursor(0))
funcs.getpos("'}")
- eq({ 2, 0 }, meths.win_get_cursor(0))
+ eq({ 2, 0 }, meths.nvim_win_get_cursor(0))
funcs.getpos("'(")
- eq({ 2, 0 }, meths.win_get_cursor(0))
+ eq({ 2, 0 }, meths.nvim_win_get_cursor(0))
funcs.getpos("')")
- eq({ 2, 0 }, meths.win_get_cursor(0))
+ eq({ 2, 0 }, meths.nvim_win_get_cursor(0))
end)
it('in command range does not move cursor #19248', function()
- meths.create_user_command('Test', ':', { range = true })
- meths.buf_set_lines(0, 0, 0, true, { 'aaaaa', 'bbbbb', 'ccccc', 'ddddd', 'eeeee' })
- meths.win_set_cursor(0, { 2, 0 })
+ meths.nvim_create_user_command('Test', ':', { range = true })
+ meths.nvim_buf_set_lines(0, 0, 0, true, { 'aaaaa', 'bbbbb', 'ccccc', 'ddddd', 'eeeee' })
+ meths.nvim_win_set_cursor(0, { 2, 0 })
command([['{,'}Test]])
- eq({ 2, 0 }, meths.win_get_cursor(0))
+ eq({ 2, 0 }, meths.nvim_win_get_cursor(0))
end)
end)
diff --git a/test/functional/editor/mode_cmdline_spec.lua b/test/functional/editor/mode_cmdline_spec.lua
index d36db80bdf..2aa4542cb7 100644
--- a/test/functional/editor/mode_cmdline_spec.lua
+++ b/test/functional/editor/mode_cmdline_spec.lua
@@ -85,7 +85,7 @@ describe('cmdline', function()
it('correctly clears end of the history', function()
-- Regression test: check absence of the memory leak when clearing end of
-- the history using cmdhist.c/clr_history().
- meths.set_option_value('history', 1, {})
+ meths.nvim_set_option_value('history', 1, {})
eq(1, funcs.histadd(':', 'foo'))
eq(1, funcs.histdel(':'))
eq('', funcs.histget(':', -1))
diff --git a/test/functional/editor/tabpage_spec.lua b/test/functional/editor/tabpage_spec.lua
index f632bbb40f..790340193f 100644
--- a/test/functional/editor/tabpage_spec.lua
+++ b/test/functional/editor/tabpage_spec.lua
@@ -74,28 +74,28 @@ describe('tabpage', function()
end)
it('nvim_win_close and nvim_win_hide update tabline #20285', function()
- eq(1, #meths.list_tabpages())
+ eq(1, #meths.nvim_list_tabpages())
eq({ 1, 1 }, funcs.win_screenpos(0))
local win1 = curwin().id
command('tabnew')
- eq(2, #meths.list_tabpages())
+ eq(2, #meths.nvim_list_tabpages())
eq({ 2, 1 }, funcs.win_screenpos(0))
local win2 = curwin().id
- meths.win_close(win1, true)
+ meths.nvim_win_close(win1, true)
eq(win2, curwin().id)
- eq(1, #meths.list_tabpages())
+ eq(1, #meths.nvim_list_tabpages())
eq({ 1, 1 }, funcs.win_screenpos(0))
command('tabnew')
- eq(2, #meths.list_tabpages())
+ eq(2, #meths.nvim_list_tabpages())
eq({ 2, 1 }, funcs.win_screenpos(0))
local win3 = curwin().id
- meths.win_hide(win2)
+ meths.nvim_win_hide(win2)
eq(win3, curwin().id)
- eq(1, #meths.list_tabpages())
+ eq(1, #meths.nvim_list_tabpages())
eq({ 1, 1 }, funcs.win_screenpos(0))
end)
@@ -143,7 +143,7 @@ describe('tabpage', function()
end)
it(':tabs does not overflow IObuff with long path with comma #20850', function()
- meths.buf_set_name(0, ('x'):rep(1024) .. ',' .. ('x'):rep(1024))
+ meths.nvim_buf_set_name(0, ('x'):rep(1024) .. ',' .. ('x'):rep(1024))
command('tabs')
assert_alive()
end)