@@ -582,4 +582,33 @@ func Test_cmdwin_existing_bufname()
582582 delfunc CheckName
583583endfunc
584584
585+ func Test_cmdwin_showcmd ()
586+ CheckScreendump
587+
588+ let lines = << trim [SCRIPT]
589+ augroup vimHints | au ! | augroup END
590+ set showcmd
591+ [SCRIPT]
592+ call writefile (lines , ' XTest_cmdwin_showcmd' , ' D' )
593+ let buf = RunVimInTerminal (' -S XTest_cmdwin_showcmd' , {' rows' : 18 })
594+
595+ for keys in [' q:' , " :\<C-F> " ]
596+ call term_sendkeys (buf , keys )
597+ call VerifyScreenDump (buf , ' Test_cmdwin_showcmd_1' , {})
598+ call term_sendkeys (buf , ' "' )
599+ call WaitForAssert ({- > assert_match (' ^: \+" *$' , term_getline (buf , 18 ))})
600+ call term_sendkeys (buf , ' x' )
601+ call WaitForAssert ({- > assert_match (' ^: \+"x *$' , term_getline (buf , 18 ))})
602+ call term_sendkeys (buf , ' y' )
603+ call WaitForAssert ({- > assert_match (' ^: \+"xy *$' , term_getline (buf , 18 ))})
604+ call term_sendkeys (buf , ' y' )
605+ call WaitForAssert ({- > assert_match (' ^: \+$' , term_getline (buf , 18 ))})
606+ call term_sendkeys (buf , " \<C-C>\<C-C> " )
607+ call VerifyScreenDump (buf , ' Test_cmdwin_showcmd_2' , {})
608+ endfor
609+
610+ " clean up
611+ call StopVimInTerminal (buf )
612+ endfunc
613+
585614" vim: shiftwidth = 2 sts = 2 expandtab
0 commit comments