aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/old/testdir/test_cmdline.vim16
1 files changed, 15 insertions, 1 deletions
diff --git a/test/old/testdir/test_cmdline.vim b/test/old/testdir/test_cmdline.vim
index d00b5bbf46..ba71f4b785 100644
--- a/test/old/testdir/test_cmdline.vim
+++ b/test/old/testdir/test_cmdline.vim
@@ -1534,7 +1534,7 @@ endfunc
set cpo&
-func Test_getcmdtype()
+func Test_getcmdtype_getcmdprompt()
call feedkeys(":MyCmd a\<C-R>=Check_cmdline(':')\<CR>\<Esc>", "xt")
let cmdtype = ''
@@ -1558,6 +1558,20 @@ func Test_getcmdtype()
cunmap <F6>
call assert_equal('', getcmdline())
+
+ call assert_equal('', getcmdprompt())
+ augroup test_CmdlineEnter
+ autocmd!
+ autocmd CmdlineEnter * let g:cmdprompt=getcmdprompt()
+ augroup END
+ call feedkeys(":call input('Answer?')\<CR>a\<CR>\<ESC>", "xt")
+ call assert_equal('Answer?', g:cmdprompt)
+ call assert_equal('', getcmdprompt())
+
+ augroup test_CmdlineEnter
+ au!
+ augroup END
+ augroup! test_CmdlineEnter
endfunc
func Test_getcmdwintype()