mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 20:08:17 +00:00
Add tests for focus events
This commit is contained in:
@@ -148,6 +148,32 @@ describe('tui', function()
|
|||||||
-- TERMINAL -- |
|
-- TERMINAL -- |
|
||||||
]])
|
]])
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
it('can handle focus events', function()
|
||||||
|
execute('autocmd FocusGained * echo "gained"')
|
||||||
|
execute('autocmd FocusLost * echo "lost"')
|
||||||
|
feed('\x1b[I')
|
||||||
|
screen:expect([[
|
||||||
|
{1: } |
|
||||||
|
~ |
|
||||||
|
~ |
|
||||||
|
~ |
|
||||||
|
[No Name] |
|
||||||
|
gained |
|
||||||
|
-- TERMINAL -- |
|
||||||
|
]])
|
||||||
|
|
||||||
|
feed('\x1b[O')
|
||||||
|
screen:expect([[
|
||||||
|
{1: } |
|
||||||
|
~ |
|
||||||
|
~ |
|
||||||
|
~ |
|
||||||
|
[No Name] |
|
||||||
|
lost |
|
||||||
|
-- TERMINAL -- |
|
||||||
|
]])
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
describe('tui with non-tty file descriptors', function()
|
describe('tui with non-tty file descriptors', function()
|
||||||
|
Reference in New Issue
Block a user