patch 8.0.1058: terminal redirection test is flaky
Problem: Terminal redirection test is flaky.
Solution: Wait for job to finish.
diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim
index 2ee25bf..8005679 100644
--- a/src/testdir/test_terminal.vim
+++ b/src/testdir/test_terminal.vim
@@ -614,6 +614,8 @@
call term_wait(buf)
call WaitFor('term_getline(' . buf . ', 1) == "one line"')
call assert_equal('one line', term_getline(buf, 1))
+ let g:job = term_getjob(buf)
+ call WaitFor('job_status(g:job) == "dead"')
bwipe
call delete('Xfile')
endif