vim-patch:8.1.0101: no test for getcmdwintype()

Problem:    No test for getcmdwintype().
Solution:   Add a test. (Dominique Pelle, closes vim/vim#3068)
81612b7a7d
This commit is contained in:
Jan Edmund Lazo 2018-08-16 12:56:14 -04:00
parent 14b148f0ad
commit 68cd18eb04

View File

@ -461,6 +461,22 @@ func Test_getcmdtype()
cunmap <F6>
endfunc
func Test_getcmdwintype()
call feedkeys("q/:let a = getcmdwintype()\<CR>:q\<CR>", 'x!')
call assert_equal('/', a)
call feedkeys("q?:let a = getcmdwintype()\<CR>:q\<CR>", 'x!')
call assert_equal('?', a)
call feedkeys("q::let a = getcmdwintype()\<CR>:q\<CR>", 'x!')
call assert_equal(':', a)
call feedkeys(":\<C-F>:let a = getcmdwintype()\<CR>:q\<CR>", 'x!')
call assert_equal(':', a)
call assert_equal('', getcmdwintype())
endfunc
func Test_verbosefile()
set verbosefile=Xlog
echomsg 'foo'