0
0
mirror of https://github.com/vim/vim.git synced 2025-10-02 05:04:20 -04:00

patch 8.2.0923: cmdline test is slow

Problem:    Cmdline test is slow.
Solution:   Use WaitForAssert().
This commit is contained in:
Bram Moolenaar
2020-06-07 17:30:33 +02:00
parent 48af321a33
commit c82dd86084
2 changed files with 5 additions and 3 deletions

View File

@@ -3,6 +3,7 @@
source check.vim source check.vim
source screendump.vim source screendump.vim
source view_util.vim source view_util.vim
source shared.vim
func Test_complete_tab() func Test_complete_tab()
call writefile(['testfile'], 'Xtestfile') call writefile(['testfile'], 'Xtestfile')
@@ -1194,13 +1195,12 @@ func Test_cmdwin_interrupted()
call writefile(lines, 'XTest_cmdwin') call writefile(lines, 'XTest_cmdwin')
let buf = RunVimInTerminal('-S XTest_cmdwin', {'rows': 18}) let buf = RunVimInTerminal('-S XTest_cmdwin', {'rows': 18})
call TermWait(buf, 1000)
" open cmdwin " open cmdwin
call term_sendkeys(buf, "q:") call term_sendkeys(buf, "q:")
call TermWait(buf, 500) call WaitForAssert({-> assert_match('-- More --', term_getline(buf, 18))})
" quit more prompt for :smile command " quit more prompt for :smile command
call term_sendkeys(buf, "q") call term_sendkeys(buf, "q")
call TermWait(buf, 500) call WaitForAssert({-> assert_match('^$', term_getline(buf, 18))})
" execute a simple command " execute a simple command
call term_sendkeys(buf, "aecho 'done'\<CR>") call term_sendkeys(buf, "aecho 'done'\<CR>")
call VerifyScreenDump(buf, 'Test_cmdwin_interrupted', {}) call VerifyScreenDump(buf, 'Test_cmdwin_interrupted', {})

View File

@@ -754,6 +754,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
923,
/**/ /**/
922, 922,
/**/ /**/