From 22536eb527e4e42ce5dfbf562678ebd060ae6988 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 25 Aug 2022 20:44:18 +0800 Subject: vim-patch:8.2.0923: cmdline test is slow Problem: Cmdline test is slow. Solution: Use WaitForAssert(). https://github.com/vim/vim/commit/c82dd86084581afa5113b0dd9ade7a631b89b4fc --- src/nvim/testdir/test_cmdline.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim index e136bd7af0..84dc361529 100644 --- a/src/nvim/testdir/test_cmdline.vim +++ b/src/nvim/testdir/test_cmdline.vim @@ -3,6 +3,7 @@ source check.vim source screendump.vim source view_util.vim +source shared.vim func Test_complete_tab() call writefile(['testfile'], 'Xtestfile') @@ -1464,13 +1465,12 @@ func Test_cmdwin_interrupted() call writefile(lines, 'XTest_cmdwin') let buf = RunVimInTerminal('-S XTest_cmdwin', {'rows': 18}) - call TermWait(buf, 1000) " open cmdwin call term_sendkeys(buf, "q:") - call TermWait(buf, 500) + call WaitForAssert({-> assert_match('-- More --', term_getline(buf, 18))}) " quit more prompt for :smile command call term_sendkeys(buf, "q") - call TermWait(buf, 500) + call WaitForAssert({-> assert_match('^$', term_getline(buf, 18))}) " execute a simple command call term_sendkeys(buf, "aecho 'done'\") call VerifyScreenDump(buf, 'Test_cmdwin_interrupted', {}) -- cgit