Mercurial > vim
diff src/testdir/test_terminal.vim @ 12734:810a4c3d4f7e v8.0.1245
patch 8.0.1245: when WaitFor() has a wrong expression it just waits a second
commit https://github.com/vim/vim/commit/3e1c617d49224038a820ee2c552ebe31a84aaa89
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Nov 2 16:58:00 2017 +0100
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.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 02 Nov 2017 17:00:08 +0100 |
parents | 17c257dd2438 |
children | c1347c968d31 |
line wrap: on
line diff
--- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -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