Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
19827:478239d7c5ae | 19828:2dc8d3e6993e |
---|---|
257 call term_sendkeys(buf, ":call setline(1, 'abc')\n") | 257 call term_sendkeys(buf, ":call setline(1, 'abc')\n") |
258 call term_sendkeys(buf, ":confirm close\n") | 258 call term_sendkeys(buf, ":confirm close\n") |
259 call WaitForAssert({-> assert_match('^\[Y\]es, (N)o, (C)ancel: *$', | 259 call WaitForAssert({-> assert_match('^\[Y\]es, (N)o, (C)ancel: *$', |
260 \ term_getline(buf, 20))}, 1000) | 260 \ term_getline(buf, 20))}, 1000) |
261 call term_sendkeys(buf, "C") | 261 call term_sendkeys(buf, "C") |
262 call term_wait(buf, 50) | 262 call WaitForAssert({-> assert_equal('', term_getline(buf, 20))}, 1000) |
263 call term_sendkeys(buf, ":confirm close\n") | 263 call term_sendkeys(buf, ":confirm close\n") |
264 call WaitForAssert({-> assert_match('^\[Y\]es, (N)o, (C)ancel: *$', | 264 call WaitForAssert({-> assert_match('^\[Y\]es, (N)o, (C)ancel: *$', |
265 \ term_getline(buf, 20))}, 1000) | 265 \ term_getline(buf, 20))}, 1000) |
266 call term_sendkeys(buf, "N") | 266 call term_sendkeys(buf, "N") |
267 call WaitForAssert({-> assert_match('^ *0,0-1 All$', | 267 call WaitForAssert({-> assert_match('^ *0,0-1 All$', |