mirror of
https://github.com/neovim/neovim.git
synced 2025-12-06 06:32:33 +00:00
test: remote/define.vim: Add some spice.
This commit is contained in:
@@ -311,14 +311,19 @@ local function function_specs_for(fn, sync, first_arg_factory, init)
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
it('with range', function()
|
it('with range', function()
|
||||||
|
helpers.insert([[
|
||||||
|
foo
|
||||||
|
bar
|
||||||
|
baz
|
||||||
|
zub]])
|
||||||
call(fn, args..[[, {'range': ''}]])
|
call(fn, args..[[, {'range': ''}]])
|
||||||
local function on_setup()
|
local function on_setup()
|
||||||
command('%call TestFunction(1, "a", ["b", "c"])')
|
command('2,3call TestFunction(1, "a", ["b", "c"])')
|
||||||
end
|
end
|
||||||
|
|
||||||
local function handler(method, arguments)
|
local function handler(method, arguments)
|
||||||
eq('test-handler', method)
|
eq('test-handler', method)
|
||||||
eq({{1, 'a', {'b', 'c'}}, {1, 1}}, arguments)
|
eq({{1, 'a', {'b', 'c'}}, {2, 3}}, arguments)
|
||||||
return 'rv'
|
return 'rv'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user