diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-06-24 09:04:56 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-24 09:04:56 +0800 |
| commit | 3a4fa22badc5595afc0a994ead965ff32ccf6c76 (patch) | |
| tree | 7e6e6e9fb52b131b6fee5c412280353cbddae53e /src/nvim/testdir/test_cmdline.vim | |
| parent | a9cb0b8a5a22fe0488f38ad67818111c7765f9d7 (diff) | |
| parent | affeb5c6ddbda0c34a9513e393d2b05f622e1514 (diff) | |
| download | rneovim-3a4fa22badc5595afc0a994ead965ff32ccf6c76.tar.gz rneovim-3a4fa22badc5595afc0a994ead965ff32ccf6c76.tar.bz2 rneovim-3a4fa22badc5595afc0a994ead965ff32ccf6c76.zip | |
Merge pull request #19072 from zeertzjq/vim-8.2.4628
vim-patch:8.2.{4628,4895,4977,5146,5154}
Diffstat (limited to 'src/nvim/testdir/test_cmdline.vim')
| -rw-r--r-- | src/nvim/testdir/test_cmdline.vim | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim index d26c80077d..887c8e1593 100644 --- a/src/nvim/testdir/test_cmdline.vim +++ b/src/nvim/testdir/test_cmdline.vim @@ -1220,6 +1220,30 @@ func Test_recalling_cmdline() cunmap <Plug>(save-cmdline) endfunc +" this was going over the end of IObuff +func Test_report_error_with_composing() + let caught = 'no' + try + exe repeat('0', 987) .. "0\xdd\x80\xdd\x80\xdd\x80\xdd\x80" + catch /E492:/ + let caught = 'yes' + endtry + call assert_equal('yes', caught) +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()) |