summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-03-23 19:22:12 +0100
committerBram Moolenaar <Bram@vim.org>2021-03-23 19:22:12 +0100
commitc54f347d63bcca97ead673d01ac6b59914bb04e5 (patch)
tree619746c4cfcb3c324f72210b21724d563a17911b
parentf4a2ed071447ad4984fad55b9d1671b55140ae1c (diff)
patch 8.2.2648: terminal resize test sometimes hangsv8.2.2648
Problem: Terminal resize test sometimes hangs. Solution: Wait for the shell to display a prompt and other output.
-rw-r--r--src/testdir/test_terminal2.vim8
-rw-r--r--src/version.c2
2 files changed, 10 insertions, 0 deletions
diff --git a/src/testdir/test_terminal2.vim b/src/testdir/test_terminal2.vim
index 4dc8350240..0f8dcb672e 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\<CR>", 'xt')
endif
+ " Wait for some output
+ call WaitForAssert({-> assert_notequal('', term_getline(buf, 3))})
+
" Go to Terminal-Normal mode for a moment.
call feedkeys("\<C-W>N", 'xt')
" Open a new window
@@ -263,6 +270,7 @@ func Test_terminal_resize()
close
call assert_equal(2, winnr('$'))
call feedkeys("exit\<CR>", 'xt')
+ call TermWait(buf)
set statusline&
endfunc
diff --git a/src/version.c b/src/version.c
index 750db2ef6e..b2b0beb731 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2648,
+/**/
2647,
/**/
2646,