Mercurial > vim
diff src/testdir/test_excmd.vim @ 19828:2dc8d3e6993e v8.2.0470
patch 8.2.0470: Test_confirm_cmd_cancel() can fail on a slow system
Commit: https://github.com/vim/vim/commit/7b1b36b1cb744e87adfbef88b7ce26c863b0594a
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Mar 28 21:48:55 2020 +0100
patch 8.2.0470: Test_confirm_cmd_cancel() can fail on a slow system
Problem: Test_confirm_cmd_cancel() can fail on a slow system.
Solution: Use WaitForAssert(). (Ozaki Kiichi, closes https://github.com/vim/vim/issues/5861)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 28 Mar 2020 22:00:04 +0100 |
parents | c110bb3b15a8 |
children | 12518b40c161 |
line wrap: on
line diff
--- a/src/testdir/test_excmd.vim +++ b/src/testdir/test_excmd.vim @@ -259,7 +259,7 @@ func Test_confirm_cmd_cancel() call WaitForAssert({-> assert_match('^\[Y\]es, (N)o, (C)ancel: *$', \ term_getline(buf, 20))}, 1000) call term_sendkeys(buf, "C") - call term_wait(buf, 50) + call WaitForAssert({-> assert_equal('', term_getline(buf, 20))}, 1000) call term_sendkeys(buf, ":confirm close\n") call WaitForAssert({-> assert_match('^\[Y\]es, (N)o, (C)ancel: *$', \ term_getline(buf, 20))}, 1000)