forked from aniani/vim
patch 8.0.1245: when WaitFor() has a wrong expression it just waits a second
Problem: When WaitFor() has a wrong expression it just waits a second,
which goes unnoticed. (James McCoy)
Solution: When WaitFor() times out throw an exception. Fix places where the
expression was wrong.
This commit is contained in:
@@ -705,7 +705,7 @@ func Test_terminal_composing_unicode()
|
||||
|
||||
enew
|
||||
let buf = term_start(cmd, {'curwin': bufnr('')})
|
||||
let job = term_getjob(buf)
|
||||
let g:job = term_getjob(buf)
|
||||
call term_wait(buf, 50)
|
||||
|
||||
" ascii + composing
|
||||
@@ -742,8 +742,9 @@ func Test_terminal_composing_unicode()
|
||||
call assert_equal("\u00a0\u0308", l[3].chars)
|
||||
|
||||
call term_sendkeys(buf, "exit\r")
|
||||
call WaitFor('job_status(job) == "dead"')
|
||||
call assert_equal('dead', job_status(job))
|
||||
call WaitFor('job_status(g:job) == "dead"')
|
||||
call assert_equal('dead', job_status(g:job))
|
||||
bwipe!
|
||||
unlet g:job
|
||||
let &encoding = save_enc
|
||||
endfunc
|
||||
|
||||
Reference in New Issue
Block a user