diff options
author | Lewis Russell <lewis6991@gmail.com> | 2024-01-12 13:11:28 +0000 |
---|---|---|
committer | Lewis Russell <lewis6991@gmail.com> | 2024-01-12 17:53:27 +0000 |
commit | 4f81f506f96f8b5bfcf00e952ceb492d3ce9dc6e (patch) | |
tree | 0cbb2cf8dac8b4f43109dc6f7a4051dfbea23f12 /test/functional/vimscript/api_functions_spec.lua | |
parent | c30f2e3182e3b50e7c03932027ac55edfc8ada4a (diff) | |
download | rneovim-4f81f506f96f8b5bfcf00e952ceb492d3ce9dc6e.tar.gz rneovim-4f81f506f96f8b5bfcf00e952ceb492d3ce9dc6e.tar.bz2 rneovim-4f81f506f96f8b5bfcf00e952ceb492d3ce9dc6e.zip |
test: normalise nvim bridge functions
- remove helpers.cur*meths
- remove helpers.nvim
Diffstat (limited to 'test/functional/vimscript/api_functions_spec.lua')
-rw-r--r-- | test/functional/vimscript/api_functions_spec.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/functional/vimscript/api_functions_spec.lua b/test/functional/vimscript/api_functions_spec.lua index 6249dcc363..29841d052a 100644 --- a/test/functional/vimscript/api_functions_spec.lua +++ b/test/functional/vimscript/api_functions_spec.lua @@ -1,7 +1,7 @@ local helpers = require('test.functional.helpers')(after_each) local Screen = require('test.functional.ui.screen') local neq, eq, command = helpers.neq, helpers.eq, helpers.command -local clear, curbufmeths = helpers.clear, helpers.curbufmeths +local clear = helpers.clear local exc_exec, expect, eval = helpers.exc_exec, helpers.expect, helpers.eval local insert, pcall_err = helpers.insert, helpers.pcall_err local matches = helpers.matches @@ -97,8 +97,8 @@ describe('eval-API', function() ) -- But others, like nvim_buf_set_lines(), which just changes text, is OK. - curbufmeths.set_lines(0, -1, 1, { 'wow!' }) - eq({ 'wow!' }, curbufmeths.get_lines(0, -1, 1)) + meths.nvim_buf_set_lines(0, 0, -1, 1, { 'wow!' }) + eq({ 'wow!' }, meths.nvim_buf_get_lines(0, 0, -1, 1)) -- Turning the cmdwin buffer into a terminal buffer would be pretty weird. eq( @@ -143,11 +143,11 @@ describe('eval-API', function() end) it('get_lines and set_lines use NL to represent NUL', function() - curbufmeths.set_lines(0, -1, true, { 'aa\0', 'b\0b' }) + meths.nvim_buf_set_lines(0, 0, -1, true, { 'aa\0', 'b\0b' }) eq({ 'aa\n', 'b\nb' }, eval('nvim_buf_get_lines(0, 0, -1, 1)')) command('call nvim_buf_set_lines(0, 1, 2, v:true, ["xx", "\\nyy"])') - eq({ 'aa\0', 'xx', '\0yy' }, curbufmeths.get_lines(0, -1, 1)) + eq({ 'aa\0', 'xx', '\0yy' }, meths.nvim_buf_get_lines(0, 0, -1, 1)) end) it('that are FUNC_ATTR_NOEVAL cannot be called', function() |