comparison src/testdir/test_popup.vim @ 13808:16a062cf08c2 v8.0.1776

patch 8.0.1776: in tests, when WaitFor() fails it doesn't say why commit https://github.com/vim/vim/commit/0e9d1ae3216a5940b36bb56d155fb300b2e55b00 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Apr 30 14:28:24 2018 +0200 patch 8.0.1776: in tests, when WaitFor() fails it doesn't say why Problem: In tests, when WaitFor() fails it doesn't say why. Solution: Turn a few more WaitFor() into WaitForAssert().
author Christian Brabandt <cb@256bit.org>
date Mon, 30 Apr 2018 14:30:07 +0200
parents a86677cf8446
children 08370aad873d
comparison
equal deleted inserted replaced
13807:8c2a02b287ee 13808:16a062cf08c2
647 647
648 call term_sendkeys(buf, "Gi\<c-x>") 648 call term_sendkeys(buf, "Gi\<c-x>")
649 call term_sendkeys(buf, "\<c-v>") 649 call term_sendkeys(buf, "\<c-v>")
650 call term_wait(buf, 100) 650 call term_wait(buf, 100)
651 " popup first entry "!" must be at the top 651 " popup first entry "!" must be at the top
652 call WaitFor({-> term_getline(buf, 1) =~ "^!"}) 652 call WaitForAssert({-> assert_match('^!\s*$', term_getline(buf, 1))})
653 call assert_match('^!\s*$', term_getline(buf, 1))
654 exe 'resize +' . (h - 1) 653 exe 'resize +' . (h - 1)
655 call term_wait(buf, 100) 654 call term_wait(buf, 100)
656 redraw! 655 redraw!
657 " popup shifted down, first line is now empty 656 " popup shifted down, first line is now empty
658 call WaitFor({-> term_getline(buf, 1) == ""}) 657 call WaitForAssert({-> assert_equal('', term_getline(buf, 1))})
659 call assert_equal('', term_getline(buf, 1))
660 sleep 100m 658 sleep 100m
661 " popup is below cursor line and shows first match "!" 659 " popup is below cursor line and shows first match "!"
662 call WaitFor({-> term_getline(buf, term_getcursor(buf)[0] + 1) =~ "^!"}) 660 call WaitForAssert({-> assert_match('^!\s*$', term_getline(buf, term_getcursor(buf)[0] + 1))})
663 call assert_match('^!\s*$', term_getline(buf, term_getcursor(buf)[0] + 1))
664 " cursor line also shows ! 661 " cursor line also shows !
665 call assert_match('^!\s*$', term_getline(buf, term_getcursor(buf)[0])) 662 call assert_match('^!\s*$', term_getline(buf, term_getcursor(buf)[0]))
666 bwipe! 663 bwipe!
667 endfunc 664 endfunc
668 665