From: Bram Moolenaar Date: Tue, 23 Mar 2021 18:22:12 +0000 (+0100) Subject: patch 8.2.2648: terminal resize test sometimes hangs X-Git-Tag: v8.2.2648 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c54f347d63bcca97ead673d01ac6b59914bb04e5;p=vim patch 8.2.2648: terminal resize test sometimes hangs Problem: Terminal resize test sometimes hangs. Solution: Wait for the shell to display a prompt and other output. --- diff --git a/src/testdir/test_terminal2.vim b/src/testdir/test_terminal2.vim index 4dc835024..0f8dcb672 100644 --- a/src/testdir/test_terminal2.vim +++ b/src/testdir/test_terminal2.vim @@ -246,6 +246,10 @@ func Test_terminal_resize() set statusline=x terminal call assert_equal(2, winnr('$')) + let buf = bufnr() + + " Wait for the shell to display a prompt + call WaitForAssert({-> assert_notequal('', term_getline(buf, 1))}) " Fill the terminal with text. if has('win32') @@ -253,6 +257,9 @@ func Test_terminal_resize() else call feedkeys("ls\", 'xt') endif + " Wait for some output + call WaitForAssert({-> assert_notequal('', term_getline(buf, 3))}) + " Go to Terminal-Normal mode for a moment. call feedkeys("\N", 'xt') " Open a new window @@ -263,6 +270,7 @@ func Test_terminal_resize() close call assert_equal(2, winnr('$')) call feedkeys("exit\", 'xt') + call TermWait(buf) set statusline& endfunc diff --git a/src/version.c b/src/version.c index 750db2ef6..b2b0beb73 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 2648, /**/ 2647, /**/