diff options
Diffstat (limited to 'test/functional/vimscript')
-rw-r--r-- | test/functional/vimscript/api_functions_spec.lua | 4 | ||||
-rw-r--r-- | test/functional/vimscript/buf_functions_spec.lua | 22 | ||||
-rw-r--r-- | test/functional/vimscript/input_spec.lua | 4 | ||||
-rw-r--r-- | test/functional/vimscript/json_functions_spec.lua | 2 | ||||
-rw-r--r-- | test/functional/vimscript/system_spec.lua | 4 |
5 files changed, 18 insertions, 18 deletions
diff --git a/test/functional/vimscript/api_functions_spec.lua b/test/functional/vimscript/api_functions_spec.lua index dc591c3e0d..3404b06a55 100644 --- a/test/functional/vimscript/api_functions_spec.lua +++ b/test/functional/vimscript/api_functions_spec.lua @@ -32,8 +32,8 @@ describe('eval-API', function() local err = exc_exec('call nvim_get_current_buf("foo")') eq('Vim(call):E118: Too many arguments for function: nvim_get_current_buf', err) - err = exc_exec('call nvim_set_option("hlsearch")') - eq('Vim(call):E119: Not enough arguments for function: nvim_set_option', err) + err = exc_exec('call nvim_set_option_value("hlsearch")') + eq('Vim(call):E119: Not enough arguments for function: nvim_set_option_value', err) err = exc_exec('call nvim_buf_set_lines(1, 0, -1, [], ["list"])') eq('Vim(call):E5555: API call: Wrong type for argument 4 when calling nvim_buf_set_lines, expecting Boolean', err) diff --git a/test/functional/vimscript/buf_functions_spec.lua b/test/functional/vimscript/buf_functions_spec.lua index 7a54f479e0..2d6d4b8e04 100644 --- a/test/functional/vimscript/buf_functions_spec.lua +++ b/test/functional/vimscript/buf_functions_spec.lua @@ -9,7 +9,6 @@ local meths = helpers.meths local command = helpers.command local exc_exec = helpers.exc_exec local bufmeths = helpers.bufmeths -local winmeths = helpers.winmeths local curbufmeths = helpers.curbufmeths local curwinmeths = helpers.curwinmeths local curtabmeths = helpers.curtabmeths @@ -189,7 +188,7 @@ describe('getbufline() function', function() eq({}, funcs.getbufline(1, -1, 9999)) end) it('returns expected lines', function() - meths.set_option('hidden', true) + meths.set_option_value('hidden', true, {}) command('file ' .. fname) curbufmeths.set_lines(0, 1, false, {'foo\0', '\0bar', 'baz'}) command('edit ' .. fname2) @@ -269,24 +268,25 @@ describe('setbufvar() function', function() end) it('may set options, including window-local and global values', function() local buf1 = meths.get_current_buf() - eq(false, curwinmeths.get_option('number')) + eq(false, meths.get_option_value('number', {win=0})) command('split') command('new') eq(2, bufmeths.get_number(curwinmeths.get_buf())) funcs.setbufvar(1, '&number', true) local windows = curtabmeths.list_wins() - eq(false, winmeths.get_option(windows[1], 'number')) - eq(true, winmeths.get_option(windows[2], 'number')) - eq(false, winmeths.get_option(windows[3], 'number')) - eq(false, winmeths.get_option(meths.get_current_win(), 'number')) + eq(false, meths.get_option_value('number', {win=windows[1].id})) + eq(true, meths.get_option_value('number', {win=windows[2].id})) + eq(false, meths.get_option_value('number', {win=windows[3].id})) + eq(false, meths.get_option_value('number', {win=meths.get_current_win().id})) - eq(true, meths.get_option('hidden')) + + eq(true, meths.get_option_value('hidden', {})) funcs.setbufvar(1, '&hidden', 0) - eq(false, meths.get_option('hidden')) + eq(false, meths.get_option_value('hidden', {})) - eq(false, bufmeths.get_option(buf1, 'autoindent')) + eq(false, meths.get_option_value('autoindent', {buf=buf1.id})) funcs.setbufvar(1, '&autoindent', true) - eq(true, bufmeths.get_option(buf1, 'autoindent')) + eq(true, meths.get_option_value('autoindent', {buf=buf1.id})) eq('Vim(call):E355: Unknown option: xxx', exc_exec('call setbufvar(1, "&xxx", 0)')) end) diff --git a/test/functional/vimscript/input_spec.lua b/test/functional/vimscript/input_spec.lua index d1643a799a..bd9f7e5381 100644 --- a/test/functional/vimscript/input_spec.lua +++ b/test/functional/vimscript/input_spec.lua @@ -452,8 +452,8 @@ end) describe('confirm()', function() -- oldtest: Test_confirm() it('works', function() - meths.set_option('more', false) -- Avoid hit-enter prompt - meths.set_option('laststatus', 2) + meths.set_option_value('more', false, {}) -- Avoid hit-enter prompt + meths.set_option_value('laststatus', 2, {}) -- screen:expect() calls are needed to avoid feeding input too early screen:expect({any = '%[No Name%]'}) diff --git a/test/functional/vimscript/json_functions_spec.lua b/test/functional/vimscript/json_functions_spec.lua index 70d0934756..a9dab8431c 100644 --- a/test/functional/vimscript/json_functions_spec.lua +++ b/test/functional/vimscript/json_functions_spec.lua @@ -754,7 +754,7 @@ describe('json_encode() function', function() end) it('ignores improper values in &isprint', function() - meths.set_option('isprint', '1') + meths.set_option_value('isprint', '1', {}) eq(1, eval('"\1" =~# "\\\\p"')) eq('"\\u0001"', funcs.json_encode('\1')) end) diff --git a/test/functional/vimscript/system_spec.lua b/test/functional/vimscript/system_spec.lua index 130d5d81fa..762e8877ce 100644 --- a/test/functional/vimscript/system_spec.lua +++ b/test/functional/vimscript/system_spec.lua @@ -210,8 +210,8 @@ describe('system()', function() end) it('prints verbose information', function() - nvim('set_option', 'shell', 'fake_shell') - nvim('set_option', 'shellcmdflag', 'cmdflag') + nvim('set_option_value', 'shell', 'fake_shell', {}) + nvim('set_option_value', 'shellcmdflag', 'cmdflag', {}) screen:try_resize(72, 14) feed(':4verbose echo system("echo hi")<cr>') |