patch 9.0.0610: global interrupt test fails when run under valgrind

Problem:    Global interrupt test fails when run under valgrind.
Solution:   Use TermWait().
This commit is contained in:
Bram Moolenaar
2022-09-27 18:05:38 +01:00
parent 66000ff9af
commit 859ea4bc76
2 changed files with 5 additions and 2 deletions

View File

@ -111,6 +111,7 @@ endfunc
" Test for interrupting :global using Ctrl-C " Test for interrupting :global using Ctrl-C
func Test_interrupt_global() func Test_interrupt_global()
CheckRunVimInTerminal CheckRunVimInTerminal
let lines =<< trim END let lines =<< trim END
cnoremap ; <Cmd>sleep 10<CR> cnoremap ; <Cmd>sleep 10<CR>
call setline(1, repeat(['foo'], 5)) call setline(1, repeat(['foo'], 5))
@ -120,14 +121,14 @@ func Test_interrupt_global()
call term_sendkeys(buf, ":g/foo/norm :\<C-V>;\<CR>") call term_sendkeys(buf, ":g/foo/norm :\<C-V>;\<CR>")
" Wait for :sleep to start " Wait for :sleep to start
call term_wait(buf) call TermWait(buf, 100)
call term_sendkeys(buf, "\<C-C>") call term_sendkeys(buf, "\<C-C>")
call WaitForAssert({-> assert_match('Interrupted', term_getline(buf, 6))}, 1000) call WaitForAssert({-> assert_match('Interrupted', term_getline(buf, 6))}, 1000)
" Also test in Ex mode " Also test in Ex mode
call term_sendkeys(buf, "gQg/foo/norm :\<C-V>;\<CR>") call term_sendkeys(buf, "gQg/foo/norm :\<C-V>;\<CR>")
" Wait for :sleep to start " Wait for :sleep to start
call term_wait(buf) call TermWait(buf, 100)
call term_sendkeys(buf, "\<C-C>") call term_sendkeys(buf, "\<C-C>")
call WaitForAssert({-> assert_match('Interrupted', term_getline(buf, 5))}, 1000) call WaitForAssert({-> assert_match('Interrupted', term_getline(buf, 5))}, 1000)

View File

@ -699,6 +699,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 */
/**/
610,
/**/ /**/
609, 609,
/**/ /**/