diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-12-09 06:12:13 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-12-09 07:52:50 +0800 |
commit | 41282259ba0d0e4ae97caa4c6e77095b1d935e80 (patch) | |
tree | 5fbaafe3227a83d575a5df99e1b25ad001395258 /src/nvim/testdir/test_usercommands.vim | |
parent | 8b3412636a1027eaa14a95211efb449b58e9a01e (diff) | |
download | rneovim-41282259ba0d0e4ae97caa4c6e77095b1d935e80.tar.gz rneovim-41282259ba0d0e4ae97caa4c6e77095b1d935e80.tar.bz2 rneovim-41282259ba0d0e4ae97caa4c6e77095b1d935e80.zip |
vim-patch:8.2.4366: not enough tests for command line completion
Problem: Not enough tests for command line completion.
Solution: Add a few more tests. (Yegappan Lakshmanan, closes vim/vim#9760)
https://github.com/vim/vim/commit/4d03d870007c593bce2cfa8d0a6597ca3a20fa35
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Diffstat (limited to 'src/nvim/testdir/test_usercommands.vim')
-rw-r--r-- | src/nvim/testdir/test_usercommands.vim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_usercommands.vim b/src/nvim/testdir/test_usercommands.vim index 5b8b384bae..522be0fd61 100644 --- a/src/nvim/testdir/test_usercommands.vim +++ b/src/nvim/testdir/test_usercommands.vim @@ -400,6 +400,17 @@ func Test_CmdCompletion() com! -nargs=? -complete=custom,min DoCmd call assert_fails("call feedkeys(':DoCmd \t', 'tx')", 'E118:') + " custom completion for a pattern with a backslash + let g:ArgLead = '' + func! CustCompl(A, L, P) + let g:ArgLead = a:A + return ['one', 'two', 'three'] + endfunc + com! -nargs=? -complete=customlist,CustCompl DoCmd + call feedkeys(":DoCmd a\\\t", 'xt') + call assert_equal('a\', g:ArgLead) + delfunc CustCompl + delcom DoCmd endfunc |