mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 19:38:20 +00:00
test: FocusGained: press-enter prompt
This commit is contained in:
@@ -295,11 +295,11 @@ describe('tui FocusGained/FocusLost', function()
|
|||||||
feed_data(":autocmd FocusGained * call append(line('$'), 'gained')\n")
|
feed_data(":autocmd FocusGained * call append(line('$'), 'gained')\n")
|
||||||
-- Enter cmdline-mode.
|
-- Enter cmdline-mode.
|
||||||
feed_data(':')
|
feed_data(':')
|
||||||
screen:sleep(10)
|
screen:sleep(1)
|
||||||
-- Send focus lost/gained termcodes.
|
-- Send focus lost/gained termcodes.
|
||||||
feed_data('\027[O')
|
feed_data('\027[O')
|
||||||
feed_data('\027[I')
|
feed_data('\027[I')
|
||||||
screen:sleep(10)
|
screen:sleep(1)
|
||||||
-- Exit cmdline-mode. Redraws from timers/events are blocked during
|
-- Exit cmdline-mode. Redraws from timers/events are blocked during
|
||||||
-- cmdline-mode, so the buffer won't be updated until we exit cmdline-mode.
|
-- cmdline-mode, so the buffer won't be updated until we exit cmdline-mode.
|
||||||
feed_data('\n')
|
feed_data('\n')
|
||||||
@@ -320,7 +320,7 @@ describe('tui FocusGained/FocusLost', function()
|
|||||||
|
|
||||||
retry(2, 3 * screen.timeout, function()
|
retry(2, 3 * screen.timeout, function()
|
||||||
feed_data(':terminal\n')
|
feed_data(':terminal\n')
|
||||||
screen:sleep(10)
|
screen:sleep(1)
|
||||||
feed_data('\027[I')
|
feed_data('\027[I')
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
{1:r}eady $ |
|
{1:r}eady $ |
|
||||||
@@ -347,6 +347,23 @@ describe('tui FocusGained/FocusLost', function()
|
|||||||
feed_data(':bwipeout!\n')
|
feed_data(':bwipeout!\n')
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
it('in press-enter prompt', function()
|
||||||
|
feed_data(":echom 'msg1'|echom 'msg2'|echom 'msg3'|echom 'msg4'|echom 'msg5'\n")
|
||||||
|
-- Execute :messages to provoke the press-enter prompt.
|
||||||
|
feed_data(":messages\n")
|
||||||
|
feed_data('\027[I')
|
||||||
|
feed_data('\027[I')
|
||||||
|
screen:expect([[
|
||||||
|
msg1 |
|
||||||
|
msg2 |
|
||||||
|
msg3 |
|
||||||
|
msg4 |
|
||||||
|
msg5 |
|
||||||
|
{10:Press ENTER or type command to continue}{1: } |
|
||||||
|
{3:-- TERMINAL --} |
|
||||||
|
]])
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- These tests require `thelpers` because --headless/--embed
|
-- These tests require `thelpers` because --headless/--embed
|
||||||
|
Reference in New Issue
Block a user