diff options
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()) |