From 932edf4f338c4d31f94fdaaa125d3ff8c2e6fe08 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Tue, 15 Oct 2019 20:50:51 +0200 Subject: [PATCH] tests: tui_spec: fix waiting for terminal to be ready (#11232) The screen would have '-- TERMINAL --' already initially. Related to flakiness of "TUI FocusGained/FocusLost in terminal-mode". --- test/functional/terminal/tui_spec.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua index 326a578bb7..4f5cfa930a 100644 --- a/test/functional/terminal/tui_spec.lua +++ b/test/functional/terminal/tui_spec.lua @@ -924,7 +924,15 @@ describe('TUI FocusGained/FocusLost', function() feed_data(':terminal\n') -- Wait for terminal to be ready. - screen:expect{any='-- TERMINAL --'} + screen:expect{grid=[[ + {1:r}eady $ | + [Process exited 0] | + | + | + | + :terminal | + {3:-- TERMINAL --} | + ]]} feed_data('\027[I') screen:expect{grid=[[