diff options
author | Lewis Russell <lewis6991@gmail.com> | 2024-01-12 12:44:54 +0000 |
---|---|---|
committer | Lewis Russell <lewis6991@gmail.com> | 2024-01-12 13:01:06 +0000 |
commit | c30f2e3182e3b50e7c03932027ac55edfc8ada4a (patch) | |
tree | edf0a76dba282d946f67fe70fff8c6cbe28e7a82 /test/functional/options/num_options_spec.lua | |
parent | 284e0ad26dd9de90c3a813dd1b357a425eca6bad (diff) | |
download | rneovim-c30f2e3182e3b50e7c03932027ac55edfc8ada4a.tar.gz rneovim-c30f2e3182e3b50e7c03932027ac55edfc8ada4a.tar.bz2 rneovim-c30f2e3182e3b50e7c03932027ac55edfc8ada4a.zip |
test: typing for helpers.meths
Diffstat (limited to 'test/functional/options/num_options_spec.lua')
-rw-r--r-- | test/functional/options/num_options_spec.lua | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/test/functional/options/num_options_spec.lua b/test/functional/options/num_options_spec.lua index d81b95ab41..9a153fb507 100644 --- a/test/functional/options/num_options_spec.lua +++ b/test/functional/options/num_options_spec.lua @@ -11,7 +11,7 @@ local function should_fail(opt, value, errmsg) feed_command('setlocal ' .. opt .. '=' .. value) eq(errmsg, eval('v:errmsg'):match('E%d*')) feed_command('let v:errmsg = ""') - local status, err = pcall(meths.set_option_value, opt, value, {}) + local status, err = pcall(meths.nvim_set_option_value, opt, value, {}) eq(status, false) eq(errmsg, err:match('E%d*')) eq('', eval('v:errmsg')) @@ -20,8 +20,8 @@ end local function should_succeed(opt, value) feed_command('setglobal ' .. opt .. '=' .. value) feed_command('setlocal ' .. opt .. '=' .. value) - meths.set_option_value(opt, value, {}) - eq(value, meths.get_option_value(opt, {})) + meths.nvim_set_option_value(opt, value, {}) + eq(value, meths.nvim_get_option_value(opt, {})) eq('', eval('v:errmsg')) end @@ -29,12 +29,12 @@ describe(':setlocal', function() before_each(clear) it('setlocal sets only local value', function() - eq(0, meths.get_option_value('iminsert', { scope = 'global' })) + eq(0, meths.nvim_get_option_value('iminsert', { scope = 'global' })) feed_command('setlocal iminsert=1') - eq(0, meths.get_option_value('iminsert', { scope = 'global' })) - eq(-1, meths.get_option_value('imsearch', { scope = 'global' })) + eq(0, meths.nvim_get_option_value('iminsert', { scope = 'global' })) + eq(-1, meths.nvim_get_option_value('imsearch', { scope = 'global' })) feed_command('setlocal imsearch=1') - eq(-1, meths.get_option_value('imsearch', { scope = 'global' })) + eq(-1, meths.nvim_get_option_value('imsearch', { scope = 'global' })) end) end) @@ -77,8 +77,8 @@ describe(':set validation', function() -- If smaller than 1 this one is set to 'lines'-1 feed_command('setglobal window=-10') - meths.set_option_value('window', -10, {}) - eq(23, meths.get_option_value('window', {})) + meths.nvim_set_option_value('window', -10, {}) + eq(23, meths.nvim_get_option_value('window', {})) eq('', eval('v:errmsg')) -- 'scrolloff' and 'sidescrolloff' can have a -1 value when @@ -112,8 +112,8 @@ describe(':set validation', function() local function setto(value) feed_command('setglobal maxcombine=' .. value) feed_command('setlocal maxcombine=' .. value) - meths.set_option_value('maxcombine', value, {}) - eq(6, meths.get_option_value('maxcombine', {})) + meths.nvim_set_option_value('maxcombine', value, {}) + eq(6, meths.nvim_get_option_value('maxcombine', {})) eq('', eval('v:errmsg')) end setto(0) |