# HG changeset patch # User Bram Moolenaar # Date 1590151503 -7200 # Node ID eb8715fac6c3cf8f1cd168975e3fe14040c0d83a # Parent 903e2ba583e5b6d6b949f81e5de1e39a3d410e18 patch 8.2.0811: terminal keycode test is flaky Commit: https://github.com/vim/vim/commit/9cdcd1d0dc3bbea41b731639fd2431c2ef5cffaa Author: Bram Moolenaar Date: Fri May 22 14:44:26 2020 +0200 patch 8.2.0811: terminal keycode test is flaky Problem: Terminal keycode test is flaky. Solution: Use WaitForAssert() diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim --- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -2493,6 +2493,7 @@ func Test_terminal_in_popup() call term_sendkeys(buf, ":call OpenTerm(1)\") call TermWait(buf, 150) call term_sendkeys(buf, ":set hlsearch\") + call TermWait(buf, 100) call term_sendkeys(buf, "/edit\") call VerifyScreenDump(buf, 'Test_terminal_popup_3', {}) @@ -2517,7 +2518,7 @@ func Test_terminal_in_popup() call TermWait(buf, 50) call term_sendkeys(buf, ":q\") - call TermWait(buf, 100) " wait for terminal to vanish + call TermWait(buf, 150) " wait for terminal to vanish call StopVimInTerminal(buf) call delete('Xtext') @@ -2704,8 +2705,7 @@ func Test_term_keycode_translation() call term_sendkeys(buf, "i") for i in range(len(keys)) call term_sendkeys(buf, "\\" .. keys[i]) - call term_wait(buf) - call assert_equal(output[i], term_getline(buf, 1)) + call WaitForAssert({-> assert_equal(output[i], term_getline(buf, 1))}) endfor let keypad_keys = ["\", "\", "\", "\", "\", "\", @@ -2720,13 +2720,11 @@ func Test_term_keycode_translation() continue endif call term_sendkeys(buf, "\" .. keypad_keys[i]) - call term_wait(buf) - call assert_equal(keypad_output[i], term_getline(buf, 1)) + call WaitForAssert({-> assert_equal(keypad_output[i], term_getline(buf, 1))}) endfor call feedkeys("\\\one\.two", 'xt') - call term_wait(buf) - call assert_equal('two', term_getline(buf, 1)) + call WaitForAssert({-> assert_equal('two', term_getline(buf, 1))}) call StopVimInTerminal(buf) endfunc diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -747,6 +747,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 811, +/**/ 810, /**/ 809,