mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
parent
4b87248285
commit
7124c0e5ac
@ -24,7 +24,7 @@ function! remote#define#CommandOnHost(host, method, sync, name, opts)
|
||||
endif
|
||||
|
||||
if has_key(a:opts, 'nargs')
|
||||
call add(forward_args, ' <args>')
|
||||
call add(forward_args, ' " . <q-args> . "')
|
||||
endif
|
||||
|
||||
exe s:GetCommandPrefix(a:name, a:opts)
|
||||
|
@ -89,6 +89,21 @@ local function command_specs_for(fn, sync, first_arg_factory, init)
|
||||
runx(sync, handler, on_setup)
|
||||
end)
|
||||
|
||||
it('with nargs/double-quote', function()
|
||||
call(fn, args..', {"nargs": "*"}')
|
||||
local function on_setup()
|
||||
command('RpcCommand "arg"')
|
||||
end
|
||||
|
||||
local function handler(method, arguments)
|
||||
eq('test-handler', method)
|
||||
eq({'"arg"'}, arguments[1])
|
||||
return ''
|
||||
end
|
||||
|
||||
runx(sync, handler, on_setup)
|
||||
end)
|
||||
|
||||
it('with range', function()
|
||||
call(fn,args..', {"range": ""}')
|
||||
local function on_setup()
|
||||
|
Loading…
Reference in New Issue
Block a user