diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2024-09-26 22:15:54 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2024-09-26 22:18:19 +0800 |
| commit | 65b6cd1b3a43024f6c2d9d6f31b8ae3a69dabb56 (patch) | |
| tree | efbbe2d84732f85fd8509c5985ed0f7d8b02252c /test | |
| parent | c2fb1fc700db28cb554be9da8e79443b5d3a5fe9 (diff) | |
| download | rneovim-65b6cd1b3a43024f6c2d9d6f31b8ae3a69dabb56.tar.gz rneovim-65b6cd1b3a43024f6c2d9d6f31b8ae3a69dabb56.tar.bz2 rneovim-65b6cd1b3a43024f6c2d9d6f31b8ae3a69dabb56.zip | |
vim-patch:9.1.0742: getcmdprompt() implementation can be improved
Problem: getcmdprompt() implementation can be improved
Solution: Improve and simplify it (h-east)
closes: vim/vim#15743
https://github.com/vim/vim/commit/25876a6cdd439054d0b3f920ccca0a435481de15
Co-authored-by: h-east <h.east.727@gmail.com>
Diffstat (limited to 'test')
| -rw-r--r-- | test/old/testdir/test_cmdline.vim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/old/testdir/test_cmdline.vim b/test/old/testdir/test_cmdline.vim index ba71f4b785..d8a217fd05 100644 --- a/test/old/testdir/test_cmdline.vim +++ b/test/old/testdir/test_cmdline.vim @@ -1567,6 +1567,17 @@ func Test_getcmdtype_getcmdprompt() call feedkeys(":call input('Answer?')\<CR>a\<CR>\<ESC>", "xt") call assert_equal('Answer?', g:cmdprompt) call assert_equal('', getcmdprompt()) + call feedkeys(":\<CR>\<ESC>", "xt") + call assert_equal('', g:cmdprompt) + call assert_equal('', getcmdprompt()) + + let str = "C" .. repeat("c", 1023) .. "xyz" + call feedkeys(":call input('" .. str .. "')\<CR>\<CR>\<ESC>", "xt") + call assert_equal(str, g:cmdprompt) + + call feedkeys(':call input("Msg1\nMessage2\nAns?")' .. "\<CR>b\<CR>\<ESC>", "xt") + call assert_equal('Ans?', g:cmdprompt) + call assert_equal('', getcmdprompt()) augroup test_CmdlineEnter au! |