tests: ex_terminal_spec: retry ":terminal (with fake shell)" (#11588)

Flaky failure (Travis CI, macOS):

    [ RUN      ] :terminal (with fake shell) works with gf: 10518.41 ms FAIL
    test/functional/terminal/ex_terminal_spec.lua:248: Row 1 did not match.
    Expected:
      |*^ready $ echo "scripts/shadacat.py"                |
      |*                                                  |
      |*[Process exited 0]                                |
      |:terminal echo "scripts/shadacat.py"              |
    Actual:
      |*^                                                  |
      |*[Process exited 0]                                |
      |*                                                  |
      |:terminal echo "scripts/shadacat.py"              |
    To print the expect() call that would assert the current screen state, use
    screen:snapshot_util(). In case of non-deterministic failures, use
    screen:redraw_debug() to show all intermediate screen states.
    stack traceback:
            test/functional/ui/screen.lua:579: in function '_wait'
            test/functional/ui/screen.lua:361: in function 'expect'
            test/functional/terminal/ex_terminal_spec.lua:248: in function <test/functional/terminal/ex_terminal_spec.lua:245>
This commit is contained in:
Daniel Hahler 2019-12-22 11:23:39 +01:00 committed by GitHub
parent 781c708c27
commit e1d63c180c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -245,12 +245,14 @@ describe(':terminal (with fake shell)', function()
it('works with gf', function()
command('set shellxquote=') -- win: avoid extra quotes
terminal_with_fake_shell([[echo "scripts/shadacat.py"]])
retry(nil, 4 * screen.timeout, function()
screen:expect([[
^ready $ echo "scripts/shadacat.py" |
|
[Process exited 0] |
:terminal echo "scripts/shadacat.py" |
]])
end)
feed([[<C-\><C-N>]])
eq('term://', string.match(eval('bufname("%")'), "^term://"))
feed([[ggf"lgf]])