comparison src/testdir/test_search.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 dd6a63e3e7c4
children 0181a2cad0a1
comparison
equal deleted inserted replaced
13807:8c2a02b287ee 13808:16a062cf08c2
492 " Prepare buffer text 492 " Prepare buffer text
493 let lines = ['abb vim vim vi', 'vimvivim'] 493 let lines = ['abb vim vim vi', 'vimvivim']
494 call writefile(lines, 'Xsearch.txt') 494 call writefile(lines, 'Xsearch.txt')
495 let buf = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile', 'Xsearch.txt'], {'term_rows': 3}) 495 let buf = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile', 'Xsearch.txt'], {'term_rows': 3})
496 496
497 call WaitFor({-> lines == [term_getline(buf, 1), term_getline(buf, 2)] }) 497 call WaitForAssert({-> assert_equal(lines, [term_getline(buf, 1), term_getline(buf, 2)])})
498 498
499 call term_sendkeys(buf, ":set incsearch hlsearch\<cr>") 499 call term_sendkeys(buf, ":set incsearch hlsearch\<cr>")
500 call term_sendkeys(buf, ":14vsp\<cr>") 500 call term_sendkeys(buf, ":14vsp\<cr>")
501 call term_sendkeys(buf, "/vim\<cr>") 501 call term_sendkeys(buf, "/vim\<cr>")
502 call term_sendkeys(buf, "/b\<esc>") 502 call term_sendkeys(buf, "/b\<esc>")
617 " Prepare buffer text 617 " Prepare buffer text
618 let lines = ['abb vim vim vi', 'vimvivim'] 618 let lines = ['abb vim vim vi', 'vimvivim']
619 call writefile(lines, 'Xsearch.txt') 619 call writefile(lines, 'Xsearch.txt')
620 let buf = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile', 'Xsearch.txt'], {'term_rows': 3}) 620 let buf = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile', 'Xsearch.txt'], {'term_rows': 3})
621 621
622 call WaitFor({-> lines == [term_getline(buf, 1), term_getline(buf, 2)] }) 622 call WaitForAssert({-> assert_equal(lines, [term_getline(buf, 1), term_getline(buf, 2)])})
623 " wait for vim to complete initialization 623 " wait for vim to complete initialization
624 call term_wait(buf) 624 call term_wait(buf)
625 625
626 " Get attr of normal(a0), incsearch(a1), hlsearch(a2) highlight 626 " Get attr of normal(a0), incsearch(a1), hlsearch(a2) highlight
627 call term_sendkeys(buf, ":set incsearch hlsearch\<cr>") 627 call term_sendkeys(buf, ":set incsearch hlsearch\<cr>")