vim-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 vim/vim#5861)
7b1b36b1cb
This commit is contained in:
Jan Edmund Lazo
2021-01-02 18:49:21 -05:00
parent 30e8c1779f
commit c3931495b2

View File

@@ -111,7 +111,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)