From 5056d40b16a3a97fc927c81ca3aa8f8bd6e44e4b Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Sat, 8 Sep 2018 09:23:19 +0200 Subject: getchar: allow in mapping --- test/functional/ex_cmds/cmd_map_spec.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/functional/ex_cmds/cmd_map_spec.lua') diff --git a/test/functional/ex_cmds/cmd_map_spec.lua b/test/functional/ex_cmds/cmd_map_spec.lua index acb76e382d..67b3ab49d6 100644 --- a/test/functional/ex_cmds/cmd_map_spec.lua +++ b/test/functional/ex_cmds/cmd_map_spec.lua @@ -8,6 +8,7 @@ local eval = helpers.eval local funcs = helpers.funcs local insert = helpers.insert local exc_exec = helpers.exc_exec +local source = helpers.source local Screen = require('test.functional.ui.screen') describe('mappings with ', function() @@ -794,5 +795,16 @@ describe('mappings with ', function() ]]) end) + it("works with mappings", function() + source([[ + map call do_it() + function! s:do_it() + let g:x = 10 + endfunction + ]]) + feed('') + eq('', eval('v:errmsg')) + eq(10, eval('g:x')) + end) end) -- cgit