aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/legacy')
-rw-r--r--test/functional/legacy/012_directory_spec.lua12
-rw-r--r--test/functional/legacy/039_visual_block_mode_commands_spec.lua2
-rw-r--r--test/functional/legacy/assert_spec.lua4
-rw-r--r--test/functional/legacy/autochdir_spec.lua2
-rw-r--r--test/functional/legacy/autocmd_option_spec.lua14
-rw-r--r--test/functional/legacy/buffer_spec.lua6
-rw-r--r--test/functional/legacy/cmdline_spec.lua14
-rw-r--r--test/functional/legacy/ex_mode_spec.lua2
-rw-r--r--test/functional/legacy/excmd_spec.lua2
-rw-r--r--test/functional/legacy/filechanged_spec.lua8
-rw-r--r--test/functional/legacy/fnamemodify_spec.lua2
-rw-r--r--test/functional/legacy/increment_spec.lua6
-rw-r--r--test/functional/legacy/mapping_spec.lua12
-rw-r--r--test/functional/legacy/messages_spec.lua6
-rw-r--r--test/functional/legacy/prompt_buffer_spec.lua18
-rw-r--r--test/functional/legacy/put_spec.lua2
-rw-r--r--test/functional/legacy/undolevels_spec.lua2
-rw-r--r--test/functional/legacy/vimscript_spec.lua2
18 files changed, 58 insertions, 58 deletions
diff --git a/test/functional/legacy/012_directory_spec.lua b/test/functional/legacy/012_directory_spec.lua
index 8f0abc471a..368ab382c0 100644
--- a/test/functional/legacy/012_directory_spec.lua
+++ b/test/functional/legacy/012_directory_spec.lua
@@ -56,9 +56,9 @@ describe("'directory' option", function()
line 3 Abcdefghij
end of testfile]])
- meths.set_option_value('swapfile', true, {})
- meths.set_option_value('swapfile', true, {})
- meths.set_option_value('directory', '.', {})
+ meths.nvim_set_option_value('swapfile', true, {})
+ meths.nvim_set_option_value('swapfile', true, {})
+ meths.nvim_set_option_value('directory', '.', {})
-- sanity check: files should not exist yet.
eq(nil, vim.uv.fs_stat('.Xtest1.swp'))
@@ -70,7 +70,7 @@ describe("'directory' option", function()
-- reading the output from :!ls.
neq(nil, vim.uv.fs_stat('.Xtest1.swp'))
- meths.set_option_value('directory', './Xtest2,.', {})
+ meths.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.set_option_value('directory', 'Xtest.je', {})
+ meths.nvim_set_option_value('directory', 'Xtest.je', {})
command('bdelete')
command('edit Xtest2/Xtest3')
- eq(true, meths.get_option_value('swapfile', {}))
+ eq(true, meths.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 ae2cc1abbe..5387883570 100644
--- a/test/functional/legacy/039_visual_block_mode_commands_spec.lua
+++ b/test/functional/legacy/039_visual_block_mode_commands_spec.lua
@@ -204,7 +204,7 @@ describe('Visual block mode', function()
feed('G2l')
feed('2k<C-v>$gj<ESC>')
feed_command([[let cpos=getpos("'>")]])
- local cpos = nvim.get_var('cpos')
+ local cpos = nvim.nvim_get_var('cpos')
local expected = {
col = 4,
off = 0,
diff --git a/test/functional/legacy/assert_spec.lua b/test/functional/legacy/assert_spec.lua
index 006f71aa4f..038bdd48f2 100644
--- a/test/functional/legacy/assert_spec.lua
+++ b/test/functional/legacy/assert_spec.lua
@@ -6,11 +6,11 @@ local exc_exec = helpers.exc_exec
local eval = helpers.eval
local function expected_errors(errors)
- eq(errors, nvim.get_vvar('errors'))
+ eq(errors, nvim.nvim_get_vvar('errors'))
end
local function expected_empty()
- eq({}, nvim.get_vvar('errors'))
+ eq({}, nvim.nvim_get_vvar('errors'))
end
describe('assert function:', function()
diff --git a/test/functional/legacy/autochdir_spec.lua b/test/functional/legacy/autochdir_spec.lua
index c6517a20aa..aca7ba9b39 100644
--- a/test/functional/legacy/autochdir_spec.lua
+++ b/test/functional/legacy/autochdir_spec.lua
@@ -5,7 +5,7 @@ local source, exec_capture = helpers.source, helpers.exec_capture
local mkdir = helpers.mkdir
local function expected_empty()
- eq({}, meths.get_vvar('errors'))
+ eq({}, meths.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 88618aeb2c..4143a3159b 100644
--- a/test/functional/legacy/autocmd_option_spec.lua
+++ b/test/functional/legacy/autocmd_option_spec.lua
@@ -38,7 +38,7 @@ local function init_var()
end
local function get_result()
- local ret = nvim.get_var('ret')
+ local ret = nvim.nvim_get_var('ret')
init_var()
return ret
end
@@ -696,24 +696,24 @@ describe('au OptionSet', function()
it('should trigger if a boolean option be set globally', function()
set_hook('autochdir')
- nvim.set_option_value('autochdir', true, { scope = 'global' })
- eq(true, nvim.get_option_value('autochdir', { scope = 'global' }))
+ nvim.nvim_set_option_value('autochdir', true, { scope = 'global' })
+ eq(true, nvim.nvim_get_option_value('autochdir', { scope = 'global' }))
expected_combination({ 'autochdir', false, '', false, true, 'global', 'setglobal' })
end)
it('should trigger if a number option be set globally', function()
set_hook('cmdheight')
- nvim.set_option_value('cmdheight', 5, { scope = 'global' })
- eq(5, nvim.get_option_value('cmdheight', { scope = 'global' }))
+ nvim.nvim_set_option_value('cmdheight', 5, { scope = 'global' })
+ eq(5, nvim.nvim_get_option_value('cmdheight', { scope = 'global' }))
expected_combination({ 'cmdheight', 1, '', 1, 5, 'global', 'setglobal' })
end)
it('should trigger if a string option be set globally', function()
set_hook('ambiwidth')
- nvim.set_option_value('ambiwidth', 'double', { scope = 'global' })
- eq('double', nvim.get_option_value('ambiwidth', { scope = 'global' }))
+ nvim.nvim_set_option_value('ambiwidth', 'double', { scope = 'global' })
+ eq('double', nvim.nvim_get_option_value('ambiwidth', { scope = 'global' }))
expected_combination({
'ambiwidth',
'single',
diff --git a/test/functional/legacy/buffer_spec.lua b/test/functional/legacy/buffer_spec.lua
index 1e8909f0d0..605cd72bf6 100644
--- a/test/functional/legacy/buffer_spec.lua
+++ b/test/functional/legacy/buffer_spec.lua
@@ -3,14 +3,14 @@ local clear, source = helpers.clear, helpers.source
local call, eq, meths = helpers.call, helpers.eq, helpers.meths
local function expected_empty()
- eq({}, meths.get_vvar('errors'))
+ eq({}, meths.nvim_get_vvar('errors'))
end
describe('buffer', function()
before_each(function()
clear()
- meths.ui_attach(80, 24, {})
- meths.set_option_value('hidden', false, {})
+ meths.nvim_ui_attach(80, 24, {})
+ meths.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 8e2ef2aabd..ea6d8409ba 100644
--- a/test/functional/legacy/cmdline_spec.lua
+++ b/test/functional/legacy/cmdline_spec.lua
@@ -198,9 +198,9 @@ describe('cmdline', function()
[3] = { reverse = true }, -- TabLineFill
})
screen:attach()
- meths.set_option_value('laststatus', 2, {})
- meths.set_option_value('showtabline', 2, {})
- meths.set_option_value('cmdheight', 1, {})
+ meths.nvim_set_option_value('laststatus', 2, {})
+ meths.nvim_set_option_value('showtabline', 2, {})
+ meths.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.set_option_value('ruler', true, {})
- meths.set_option_value('rulerformat', 'longish', {})
- meths.set_option_value('laststatus', 0, {})
- meths.set_option_value('winwidth', 1, {})
+ 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, {})
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 90abf9ebd7..85057938e3 100644
--- a/test/functional/legacy/ex_mode_spec.lua
+++ b/test/functional/legacy/ex_mode_spec.lua
@@ -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.replace_termcodes(expected, true, true, true), ret)
+ eq(meths.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 ba41a983e2..160be8acd1 100644
--- a/test/functional/legacy/excmd_spec.lua
+++ b/test/functional/legacy/excmd_spec.lua
@@ -24,7 +24,7 @@ end
describe('Ex command', function()
before_each(clear)
after_each(function()
- eq({}, meths.get_vvar('errors'))
+ eq({}, meths.nvim_get_vvar('errors'))
end)
it('checks for address line overflow', function()
diff --git a/test/functional/legacy/filechanged_spec.lua b/test/functional/legacy/filechanged_spec.lua
index c8e772f597..0a088772a5 100644
--- a/test/functional/legacy/filechanged_spec.lua
+++ b/test/functional/legacy/filechanged_spec.lua
@@ -5,15 +5,15 @@ local is_os = helpers.is_os
local skip = helpers.skip
local function expected_empty()
- eq({}, meths.get_vvar('errors'))
+ eq({}, meths.nvim_get_vvar('errors'))
end
describe('file changed dialog', function()
before_each(function()
clear()
- meths.ui_attach(80, 24, {})
- meths.set_option_value('autoread', false, {})
- meths.set_option_value('fsync', true, {})
+ meths.nvim_ui_attach(80, 24, {})
+ meths.nvim_set_option_value('autoread', false, {})
+ meths.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 6262db3a2f..c6beb6d7df 100644
--- a/test/functional/legacy/fnamemodify_spec.lua
+++ b/test/functional/legacy/fnamemodify_spec.lua
@@ -5,7 +5,7 @@ local clear, source = helpers.clear, helpers.source
local call, eq, nvim = helpers.call, helpers.eq, helpers.meths
local function expected_empty()
- eq({}, nvim.get_vvar('errors'))
+ eq({}, nvim.nvim_get_vvar('errors'))
end
describe('filename modifiers', function()
diff --git a/test/functional/legacy/increment_spec.lua b/test/functional/legacy/increment_spec.lua
index 212ad041c0..9e19841375 100644
--- a/test/functional/legacy/increment_spec.lua
+++ b/test/functional/legacy/increment_spec.lua
@@ -743,18 +743,18 @@ describe('Ctrl-A/Ctrl-X on visual selections', function()
it('works on Test ' .. id, function()
command('set nrformats&vi') -- &vi makes Vim compatible
call('Test_visual_increment_' .. id)
- eq({}, nvim.get_vvar('errors'))
+ eq({}, nvim.nvim_get_vvar('errors'))
end)
end
it('does not drop leading zeroes', function()
command('set nrformats&vi') -- &vi makes Vim compatible
call('Test_normal_increment_01')
- eq({}, nvim.get_vvar('errors'))
+ eq({}, nvim.nvim_get_vvar('errors'))
end)
it('maintains correct column after CTRL-A', function()
call('Test_normal_increment_02')
- eq({}, nvim.get_vvar('errors'))
+ eq({}, nvim.nvim_get_vvar('errors'))
end)
end)
diff --git a/test/functional/legacy/mapping_spec.lua b/test/functional/legacy/mapping_spec.lua
index 46c9a869ac..7058e70c4f 100644
--- a/test/functional/legacy/mapping_spec.lua
+++ b/test/functional/legacy/mapping_spec.lua
@@ -134,9 +134,9 @@ describe('mapping', function()
command('nnoremap <LeftDrag> <LeftDrag><Cmd><CR>')
poke_eventloop()
- meths.input_mouse('left', 'press', '', 0, 0, 0)
+ meths.nvim_input_mouse('left', 'press', '', 0, 0, 0)
poke_eventloop()
- meths.input_mouse('left', 'drag', '', 0, 0, 1)
+ meths.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.input_mouse('left', 'press', '', 0, 0, 0)
+ meths.nvim_input_mouse('left', 'press', '', 0, 0, 0)
poke_eventloop()
- meths.input_mouse('left', 'drag', '', 0, 0, 1)
+ meths.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.input_mouse('left', 'press', '', 0, 0, 0)
+ meths.nvim_input_mouse('left', 'press', '', 0, 0, 0)
poke_eventloop()
- meths.input_mouse('left', 'drag', '', 0, 0, 1)
+ meths.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 97c6d23494..c416ebfc99 100644
--- a/test/functional/legacy/messages_spec.lua
+++ b/test/functional/legacy/messages_spec.lua
@@ -410,9 +410,9 @@ describe('messages', function()
screen:attach()
command('cd ' .. nvim_dir)
- meths.set_option_value('shell', './shell-test', {})
- meths.set_option_value('shellcmdflag', 'REP 20', {})
- meths.set_option_value('shellxquote', '', {}) -- win: avoid extra quotes
+ 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
-- 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/prompt_buffer_spec.lua b/test/functional/legacy/prompt_buffer_spec.lua
index 76c57a23b9..e372d713c4 100644
--- a/test/functional/legacy/prompt_buffer_spec.lua
+++ b/test/functional/legacy/prompt_buffer_spec.lua
@@ -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.get_mode())
+ eq({ mode = 'i', blocking = false }, meths.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.get_current_win()
+ local prev_win = meths.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.get_var('entered'))
- neq(prev_win, meths.get_current_win())
+ eq('something', meths.nvim_get_var('entered'))
+ neq(prev_win, meths.nvim_get_current_win())
feed('exit<CR>')
- eq(prev_win, meths.get_current_win())
- eq({ mode = 'n', blocking = false }, meths.get_mode())
+ eq(prev_win, meths.nvim_get_current_win())
+ eq({ mode = 'n', blocking = false }, meths.nvim_get_mode())
command('call DoAppend()')
- eq({ mode = 'n', blocking = false }, meths.get_mode())
+ eq({ mode = 'n', blocking = false }, meths.nvim_get_mode())
feed('i')
- eq({ mode = 'i', blocking = false }, meths.get_mode())
+ eq({ mode = 'i', blocking = false }, meths.nvim_get_mode())
command('call DoAppend()')
- eq({ mode = 'i', blocking = false }, meths.get_mode())
+ eq({ mode = 'i', blocking = false }, meths.nvim_get_mode())
end)
end)
diff --git a/test/functional/legacy/put_spec.lua b/test/functional/legacy/put_spec.lua
index 791656cc03..1678d8f2d8 100644
--- a/test/functional/legacy/put_spec.lua
+++ b/test/functional/legacy/put_spec.lua
@@ -16,7 +16,7 @@ end
describe('put', function()
before_each(clear)
after_each(function()
- eq({}, meths.get_vvar('errors'))
+ eq({}, meths.nvim_get_vvar('errors'))
end)
it('very large count 64-bit', function()
diff --git a/test/functional/legacy/undolevels_spec.lua b/test/functional/legacy/undolevels_spec.lua
index 1dfc4c17ba..a22cda27b6 100644
--- a/test/functional/legacy/undolevels_spec.lua
+++ b/test/functional/legacy/undolevels_spec.lua
@@ -57,6 +57,6 @@ describe('undolevel', function()
call Test_global_local_undolevels()
]])
- eq({}, nvim.get_vvar('errors'))
+ eq({}, nvim.nvim_get_vvar('errors'))
end)
end)
diff --git a/test/functional/legacy/vimscript_spec.lua b/test/functional/legacy/vimscript_spec.lua
index c97208059b..eb3c70ecc6 100644
--- a/test/functional/legacy/vimscript_spec.lua
+++ b/test/functional/legacy/vimscript_spec.lua
@@ -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.set_option_value('laststatus', 2, {})
+ meths.nvim_set_option_value('laststatus', 2, {})
exec([[
" Deep nesting of if ... endif
func Test1()