diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-10-11 06:48:45 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-10 22:48:45 +0000 |
commit | 6f1601a1b94e6ea724d8436600c64760525d1d2b (patch) | |
tree | 547a6639977d43b6ff54fd30345612326cc9706f /test | |
parent | b3109084c2c3675aa886bf16ff15f50025f30096 (diff) | |
download | rneovim-6f1601a1b94e6ea724d8436600c64760525d1d2b.tar.gz rneovim-6f1601a1b94e6ea724d8436600c64760525d1d2b.tar.bz2 rneovim-6f1601a1b94e6ea724d8436600c64760525d1d2b.zip |
vim-patch:9.1.0774: "shellcmdline" doesn't work with getcompletion() (#30750)
Problem: "shellcmdline" doesn't work with getcompletion().
Solution: Use set_context_for_wildcard_arg() (zeertzjq).
closes: vim/vim#15834
https://github.com/vim/vim/commit/85f36d61e09b12d6f1c60201129823371daa4a84
Diffstat (limited to 'test')
-rw-r--r-- | test/old/testdir/test_cmdline.vim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/old/testdir/test_cmdline.vim b/test/old/testdir/test_cmdline.vim index a5df637cc2..0ef2c33c03 100644 --- a/test/old/testdir/test_cmdline.vim +++ b/test/old/testdir/test_cmdline.vim @@ -1032,6 +1032,8 @@ func Test_cmdline_complete_shellcmdline() call feedkeys(":MyCmd whoam\<C-A>\<C-B>\"\<CR>", 'tx') call assert_match('^".*\<whoami\>', @:) + let l = getcompletion('whoam', 'shellcmdline') + call assert_match('\<whoami\>', join(l, ' ')) delcommand MyCmd endfunc @@ -3818,9 +3820,13 @@ func Test_cmdline_complete_shellcmdline_argument() call feedkeys(":MyCmd vim test_cmdline.\<Tab>\<C-B>\"\<CR>", 'xt') call assert_equal('"MyCmd vim test_cmdline.vim', @:) + call assert_equal(['test_cmdline.vim'], + \ getcompletion('vim test_cmdline.', 'shellcmdline')) call feedkeys(":MyCmd vim nonexistentfile\<Tab>\<C-B>\"\<CR>", 'xt') call assert_equal('"MyCmd vim nonexistentfile', @:) + call assert_equal([], + \ getcompletion('vim nonexistentfile', 'shellcmdline')) let compl1 = getcompletion('', 'file')[0] let compl2 = getcompletion('', 'file')[1] @@ -3837,9 +3843,13 @@ func Test_cmdline_complete_shellcmdline_argument() set wildoptions& call feedkeys(":MyCmd vim test_cmdline.\<Tab>\<C-B>\"\<CR>", 'xt') call assert_equal('"MyCmd vim test_cmdline.vim', @:) + call assert_equal(['test_cmdline.vim'], + \ getcompletion('vim test_cmdline.', 'shellcmdline')) call feedkeys(":MyCmd vim nonexistentfile\<Tab>\<C-B>\"\<CR>", 'xt') call assert_equal('"MyCmd vim nonexistentfile', @:) + call assert_equal([], + \ getcompletion('vim nonexistentfile', 'shellcmdline')) let compl1 = getcompletion('', 'file')[0] let compl2 = getcompletion('', 'file')[1] |