diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-06-24 06:22:22 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2022-06-24 07:26:06 +0800 |
| commit | 764dc7c383235950c153a133d399523e2bbffed4 (patch) | |
| tree | ec7007e2fdac3e35304ed2feccfccd6e3b2d20e3 /src/nvim/testdir/test_cmdline.vim | |
| parent | a9cb0b8a5a22fe0488f38ad67818111c7765f9d7 (diff) | |
| download | rneovim-764dc7c383235950c153a133d399523e2bbffed4.tar.gz rneovim-764dc7c383235950c153a133d399523e2bbffed4.tar.bz2 rneovim-764dc7c383235950c153a133d399523e2bbffed4.zip | |
vim-patch:8.2.4628: not enough testing for 2/3 letter substitute commands
Problem: Not enough testing for 2/3 letter substitute commands.
Solution: Add more tests. (Yegappan Lakshmanan, closes vim/vim#10019)
https://github.com/vim/vim/commit/5e877baf87530d5c4fe4da2c5a6269cf19526c27
Diffstat (limited to 'src/nvim/testdir/test_cmdline.vim')
| -rw-r--r-- | src/nvim/testdir/test_cmdline.vim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim index d26c80077d..4630ddd6e7 100644 --- a/src/nvim/testdir/test_cmdline.vim +++ b/src/nvim/testdir/test_cmdline.vim @@ -1220,6 +1220,19 @@ func Test_recalling_cmdline() cunmap <Plug>(save-cmdline) endfunc +" Test for expanding 2-letter and 3-letter :substitute command arguments. +" These commands don't accept an argument. +func Test_cmdline_complete_substitute_short() + for cmd in ['sc', 'sce', 'scg', 'sci', 'scI', 'scn', 'scp', 'scl', + \ 'sgc', 'sge', 'sg', 'sgi', 'sgI', 'sgn', 'sgp', 'sgl', 'sgr', + \ 'sic', 'sie', 'si', 'siI', 'sin', 'sip', 'sir', + \ 'sIc', 'sIe', 'sIg', 'sIi', 'sI', 'sIn', 'sIp', 'sIl', 'sIr', + \ 'src', 'srg', 'sri', 'srI', 'srn', 'srp', 'srl', 'sr'] + call feedkeys(':' .. cmd .. " \<Tab>\<C-B>\"\<CR>", 'tx') + call assert_equal('"' .. cmd .. " \<Tab>", @:) + endfor +endfunc + func Check_completion() call assert_equal('let a', getcmdline()) call assert_equal(6, getcmdpos()) |