aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_usercommands.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/testdir/test_usercommands.vim')
-rw-r--r--src/nvim/testdir/test_usercommands.vim12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_usercommands.vim b/src/nvim/testdir/test_usercommands.vim
index db603610da..1520c2f32a 100644
--- a/src/nvim/testdir/test_usercommands.vim
+++ b/src/nvim/testdir/test_usercommands.vim
@@ -206,3 +206,15 @@ func Test_CmdCompletion()
com! -complete=customlist,CustomComp DoCmd :
call assert_fails("call feedkeys(':DoCmd \<C-D>', 'tx')", 'E117:')
endfunc
+
+func CallExecute(A, L, P)
+ " Drop first '\n'
+ return execute('echo "hi"')[1:]
+endfunc
+
+func Test_use_execute_in_completion()
+ command! -nargs=* -complete=custom,CallExecute DoExec :
+ call feedkeys(":DoExec \<C-A>\<C-B>\"\<CR>", 'tx')
+ call assert_equal('"DoExec hi', @:)
+ delcommand DoExec
+endfunc