diff options
Diffstat (limited to 'test/functional/terminal/tui_spec.lua')
| -rw-r--r-- | test/functional/terminal/tui_spec.lua | 69 |
1 files changed, 33 insertions, 36 deletions
diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua index 6c7d992f40..56c1cc0d7b 100644 --- a/test/functional/terminal/tui_spec.lua +++ b/test/functional/terminal/tui_spec.lua @@ -122,10 +122,10 @@ describe('TUI', function() screen:try_resize(50,5) screen:expect{grid=[[ - {8:FAIL 1} | - {8:FAIL 2} | {8:FAIL 3} | - {10:-- More -- SPACE/d/j: screen/page/line down, b/u/}{12:k}| + {8:FAIL 4} | + {8:FAIL 5} | + {10:-- More --}{1: } | {3:-- TERMINAL --} | ]]} @@ -144,12 +144,12 @@ describe('TUI', function() ) | {8:Error detected while processing function ManyErr:} | {11:line 2:} | - {10:-- More --} | - {10: }| - {10: }| - {10: }| - {10: }| - {10:-- More -- SPACE/d/j: screen/page/line down, b/u/}{12:k}| + {8:FAIL 0} | + {8:FAIL 1} | + {8:FAIL 2} | + {8:FAIL 3} | + {8:FAIL 4} | + {10:-- More --}{1: } | {3:-- TERMINAL --} | ]]} @@ -850,34 +850,31 @@ describe('TUI FocusGained/FocusLost', function() feed_data(':set shell='..nvim_dir..'/shell-test\n') feed_data(':set noshowmode laststatus=0\n') - retry(2, 3 * screen.timeout, function() - feed_data(':terminal\n') - screen:sleep(1) - feed_data('\027[I') - screen:expect([[ - {1:r}eady $ | - [Process exited 0] | - | - | - | - gained | - {3:-- TERMINAL --} | - ]]) - feed_data('\027[O') - screen:expect([[ - {1:r}eady $ | - [Process exited 0] | - | - | - | - lost | - {3:-- TERMINAL --} | - ]]) + feed_data(':terminal\n') + -- Wait for terminal to be ready. + screen:expect{any='-- TERMINAL --'} - -- If retry is needed... - feed_data("\034\016") -- CTRL-\ CTRL-N - feed_data(':bwipeout!\n') - end) + feed_data('\027[I') + screen:expect{grid=[[ + {1:r}eady $ | + [Process exited 0] | + | + | + | + gained | + {3:-- TERMINAL --} | + ]], timeout=(3 * screen.timeout)} + + feed_data('\027[O') + screen:expect([[ + {1:r}eady $ | + [Process exited 0] | + | + | + | + lost | + {3:-- TERMINAL --} | + ]]) end) it('in press-enter prompt', function() |
