aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_usercommands.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-10-26 14:38:26 +0800
committerGitHub <noreply@github.com>2022-10-26 14:38:26 +0800
commitc00844aee4d9b607073ff123dfe2e872c9b84954 (patch)
tree837c0973319b8d168db9ccd96d6ae113d29287e7 /src/nvim/testdir/test_usercommands.vim
parentec33edc7b7027b809ac0b496344367a451e3974a (diff)
parent7b39ce36a4599539cd5cb07dad6bd980d30a3180 (diff)
downloadrneovim-c00844aee4d9b607073ff123dfe2e872c9b84954.tar.gz
rneovim-c00844aee4d9b607073ff123dfe2e872c9b84954.tar.bz2
rneovim-c00844aee4d9b607073ff123dfe2e872c9b84954.zip
Merge pull request #20806 from zeertzjq/vim-8.2.0401
vim-patch:7.4.{1081,1097},8.2.{0401,0418}: eval tests
Diffstat (limited to 'src/nvim/testdir/test_usercommands.vim')
-rw-r--r--src/nvim/testdir/test_usercommands.vim21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_usercommands.vim b/src/nvim/testdir/test_usercommands.vim
index 12fe39851d..a3070d6517 100644
--- a/src/nvim/testdir/test_usercommands.vim
+++ b/src/nvim/testdir/test_usercommands.vim
@@ -617,6 +617,27 @@ func Test_command_list()
call assert_equal("\nNo user-defined commands found", execute('command'))
endfunc
+" Test for a custom user completion returning the wrong value type
+func Test_usercmd_custom()
+ func T1(a, c, p)
+ return "a\nb\n"
+ endfunc
+ command -nargs=* -complete=customlist,T1 TCmd1
+ call feedkeys(":T1 \<C-A>\<C-B>\"\<CR>", 'xt')
+ call assert_equal('"T1 ', @:)
+ delcommand TCmd1
+ delfunc T1
+
+ func T2(a, c, p)
+ return ['a', 'b', 'c']
+ endfunc
+ command -nargs=* -complete=customlist,T2 TCmd2
+ call feedkeys(":T2 \<C-A>\<C-B>\"\<CR>", 'xt')
+ call assert_equal('"T2 ', @:)
+ delcommand TCmd2
+ delfunc T2
+endfunc
+
func Test_delcommand_buffer()
command Global echo 'global'
command -buffer OneBuffer echo 'one'