Mercurial > vim
comparison src/testdir/test_terminal.vim @ 12357:9a7fb1d01137 v8.0.1058
patch 8.0.1058: terminal redirection test is flaky
commit https://github.com/vim/vim/commit/8b53b79ea5304c7714cbb873210c82aa3fc8772f
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Sep 5 20:29:25 2017 +0200
patch 8.0.1058: terminal redirection test is flaky
Problem: Terminal redirection test is flaky.
Solution: Wait for job to finish.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 05 Sep 2017 20:30:05 +0200 |
parents | 368a7bf382c7 |
children | d0cf7f71b95b |
comparison
equal
deleted
inserted
replaced
12356:bdbca05f588e | 12357:9a7fb1d01137 |
---|---|
612 call writefile(['one line'], 'Xfile') | 612 call writefile(['one line'], 'Xfile') |
613 let buf = term_start('cat', {'in_io': 'file', 'in_name': 'Xfile'}) | 613 let buf = term_start('cat', {'in_io': 'file', 'in_name': 'Xfile'}) |
614 call term_wait(buf) | 614 call term_wait(buf) |
615 call WaitFor('term_getline(' . buf . ', 1) == "one line"') | 615 call WaitFor('term_getline(' . buf . ', 1) == "one line"') |
616 call assert_equal('one line', term_getline(buf, 1)) | 616 call assert_equal('one line', term_getline(buf, 1)) |
617 let g:job = term_getjob(buf) | |
618 call WaitFor('job_status(g:job) == "dead"') | |
617 bwipe | 619 bwipe |
618 call delete('Xfile') | 620 call delete('Xfile') |
619 endif | 621 endif |
620 endfunc | 622 endfunc |