forked from aniani/vim
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 #9516) Add TermWait() inside Run_shell_in_terminal() as a generic solution.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user