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/vimscript/ctx_functions_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/vimscript/ctx_functions_spec.lua')
-rw-r--r-- | test/functional/vimscript/ctx_functions_spec.lua | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/test/functional/vimscript/ctx_functions_spec.lua b/test/functional/vimscript/ctx_functions_spec.lua index ced29a6b76..b8f9bbc92d 100644 --- a/test/functional/vimscript/ctx_functions_spec.lua +++ b/test/functional/vimscript/ctx_functions_spec.lua @@ -7,7 +7,7 @@ local eq = helpers.eq local eval = helpers.eval local feed = helpers.feed local map = vim.tbl_map -local meths = helpers.meths +local api = helpers.api local parse_context = helpers.parse_context local exec_capture = helpers.exec_capture local source = helpers.source @@ -126,16 +126,16 @@ describe('context functions', function() end) it('saves and restores global variables properly', function() - meths.nvim_set_var('one', 1) - meths.nvim_set_var('Two', 2) - meths.nvim_set_var('THREE', 3) + api.nvim_set_var('one', 1) + api.nvim_set_var('Two', 2) + api.nvim_set_var('THREE', 3) eq({ 1, 2, 3 }, eval('[g:one, g:Two, g:THREE]')) call('ctxpush') call('ctxpush', { 'gvars' }) - meths.nvim_del_var('one') - meths.nvim_del_var('Two') - meths.nvim_del_var('THREE') + api.nvim_del_var('one') + api.nvim_del_var('Two') + api.nvim_del_var('THREE') eq('Vim:E121: Undefined variable: g:one', pcall_err(eval, 'g:one')) eq('Vim:E121: Undefined variable: g:Two', pcall_err(eval, 'g:Two')) eq('Vim:E121: Undefined variable: g:THREE', pcall_err(eval, 'g:THREE')) @@ -143,9 +143,9 @@ describe('context functions', function() call('ctxpop') eq({ 1, 2, 3 }, eval('[g:one, g:Two, g:THREE]')) - meths.nvim_del_var('one') - meths.nvim_del_var('Two') - meths.nvim_del_var('THREE') + api.nvim_del_var('one') + api.nvim_del_var('Two') + api.nvim_del_var('THREE') eq('Vim:E121: Undefined variable: g:one', pcall_err(eval, 'g:one')) eq('Vim:E121: Undefined variable: g:Two', pcall_err(eval, 'g:Two')) eq('Vim:E121: Undefined variable: g:THREE', pcall_err(eval, 'g:THREE')) @@ -300,9 +300,9 @@ describe('context functions', function() feed('G') feed('gg') command('edit ' .. fname2) - meths.nvim_set_var('one', 1) - meths.nvim_set_var('Two', 2) - meths.nvim_set_var('THREE', 3) + api.nvim_set_var('one', 1) + api.nvim_set_var('Two', 2) + api.nvim_set_var('THREE', 3) local with_regs = { ['regs'] = { @@ -412,14 +412,14 @@ describe('context functions', function() end) it('sets context dictionary at index in context stack', function() - meths.nvim_set_var('one', 1) - meths.nvim_set_var('Two', 2) - meths.nvim_set_var('THREE', 3) + api.nvim_set_var('one', 1) + api.nvim_set_var('Two', 2) + api.nvim_set_var('THREE', 3) call('ctxpush') local ctx1 = call('ctxget') - meths.nvim_set_var('one', 'a') - meths.nvim_set_var('Two', 'b') - meths.nvim_set_var('THREE', 'c') + api.nvim_set_var('one', 'a') + api.nvim_set_var('Two', 'b') + api.nvim_set_var('THREE', 'c') call('ctxpush') call('ctxpush') local ctx2 = call('ctxget') @@ -431,7 +431,7 @@ describe('context functions', function() eq({ 1, 2, 3 }, eval('[g:one, g:Two, g:THREE]')) call('ctxpop') eq({ 'a', 'b', 'c' }, eval('[g:one, g:Two, g:THREE]')) - meths.nvim_set_var('one', 1.5) + api.nvim_set_var('one', 1.5) eq({ 1.5, 'b', 'c' }, eval('[g:one, g:Two, g:THREE]')) call('ctxpop') eq({ 'a', 'b', 'c' }, eval('[g:one, g:Two, g:THREE]')) |