From b866d8d2e7cf4c2f00b1adc997188f1d04c13fa1 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 4 Dec 2022 18:33:04 +0800 Subject: vim-patch:9.0.0610: global interrupt test fails when run under valgrind (#21285) Problem: Global interrupt test fails when run under valgrind. Solution: Use TermWait(). https://github.com/vim/vim/commit/859ea4bc76699232e41aea0f308463bab887b0c1 Co-authored-by: Bram Moolenaar --- src/nvim/testdir/test_global.vim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/nvim/testdir/test_global.vim b/src/nvim/testdir/test_global.vim index bbfe374f51..8fb4ee0cfa 100644 --- a/src/nvim/testdir/test_global.vim +++ b/src/nvim/testdir/test_global.vim @@ -91,6 +91,7 @@ endfunc " Test for interrupting :global using Ctrl-C func Test_interrupt_global() CheckRunVimInTerminal + let lines =<< trim END cnoremap ; sleep 10 call setline(1, repeat(['foo'], 5)) @@ -100,14 +101,14 @@ func Test_interrupt_global() call term_sendkeys(buf, ":g/foo/norm :\;\") " Wait for :sleep to start - call term_wait(buf) + call TermWait(buf, 100) call term_sendkeys(buf, "\") call WaitForAssert({-> assert_match('Interrupted', term_getline(buf, 6))}, 1000) " Also test in Ex mode call term_sendkeys(buf, "gQg/foo/norm :\;\") " Wait for :sleep to start - call term_wait(buf) + call TermWait(buf, 100) call term_sendkeys(buf, "\") call WaitForAssert({-> assert_match('Interrupted', term_getline(buf, 5))}, 1000) -- cgit