1
0
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:
Bram Moolenaar
2017-11-02 16:58:00 +01:00
parent b94340c04f
commit 3e1c617d49
5 changed files with 33 additions and 26 deletions

View File

@@ -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