aboutsummaryrefslogtreecommitdiff
path: root/test/functional/provider
diff options
context:
space:
mode:
authorCase Nelson <case@outpace.com>2016-04-10 00:20:57 -0600
committerJustin M. Keyes <justinkz@gmail.com>2016-04-18 05:40:15 -0400
commit4a200ceafa475f5c4a7dc576df97a12caedd3590 (patch)
treebaf59fe68bf9e462dcc967547cf337f9de36a1b9 /test/functional/provider
parentd835c030f24a598ef02815dfd21dd40307f9a22c (diff)
downloadrneovim-4a200ceafa475f5c4a7dc576df97a12caedd3590.tar.gz
rneovim-4a200ceafa475f5c4a7dc576df97a12caedd3590.tar.bz2
rneovim-4a200ceafa475f5c4a7dc576df97a12caedd3590.zip
test: remote/define.vim: range
Diffstat (limited to 'test/functional/provider')
-rw-r--r--test/functional/provider/define_spec.lua33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/functional/provider/define_spec.lua b/test/functional/provider/define_spec.lua
index 6e8a3b89cd..4a8c68350f 100644
--- a/test/functional/provider/define_spec.lua
+++ b/test/functional/provider/define_spec.lua
@@ -333,6 +333,39 @@ local function function_specs_for(fn, sync, first_arg_factory, init)
runx(sync, handler, on_setup)
end)
end)
+
+ describe('with range', function()
+ it('ok', function()
+ call(fn, args..[[, {'range': ''}]])
+ local function on_setup()
+ command('%call TestFunction(1, "a", ["b", "c"])')
+ end
+
+ local function handler(method, arguments)
+ eq('test-handler', method)
+ eq({{1, 'a', {'b', 'c'}}, {1, 1}}, arguments)
+ return 'rv'
+ end
+
+ runx(sync, handler, on_setup)
+ end)
+ end)
+ describe('with eval/range', function()
+ it('ok', function()
+ call(fn, args..[[, {'eval': '4', 'range': ''}]])
+ local function on_setup()
+ command('%call TestFunction(1, "a", ["b", "c"])')
+ end
+
+ local function handler(method, arguments)
+ eq('test-handler', method)
+ eq({{1, 'a', {'b', 'c'}}, {1, 1}, 4}, arguments)
+ return 'rv'
+ end
+
+ runx(sync, handler, on_setup)
+ end)
+ end)
end)
end)
end