Mercurial > vim
diff src/testdir/term_util.vim @ 27098:8bb07c88ac27 v8.2.4078
patch 8.2.4078: terminal test for current directory not used on FreeBSD
Commit: https://github.com/vim/vim/commit/ced2b38a560cc4f4ec983ed2cf4372ab62e1dbc1
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jan 13 15:25:32 2022 +0000
patch 8.2.4078: terminal test for current directory not used on FreeBSD
Problem: Terminal test for current directory not used on FreeBSD.
Solution: Make it work on FreeBSD. (Ozaki Kiichi, closes https://github.com/vim/vim/issues/9516) Add
TermWait() inside Run_shell_in_terminal() as a generic solution.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 13 Jan 2022 16:30:04 +0100 |
parents | 3f96a5dc0c53 |
children | fbc4d3b0302d |
line wrap: on
line diff
--- a/src/testdir/term_util.vim +++ b/src/testdir/term_util.vim @@ -24,6 +24,7 @@ func StopShellInTerminal(buf) call term_sendkeys(a:buf, "exit\r") let job = term_getjob(a:buf) call WaitForAssert({-> assert_equal("dead", job_status(job))}) + call TermWait(a:buf) endfunc " Wrapper around term_wait() to allow more time for re-runs of flaky tests @@ -176,6 +177,10 @@ func Run_shell_in_terminal(options) let string = string({'job': buf->term_getjob()}) call assert_match("{'job': 'process \\d\\+ run'}", string) + " On slower systems it may take a bit of time before the shell is ready to + " accept keys. This mainly matters when using term_sendkeys() next. + call TermWait(buf) + return buf endfunc