diff options
author | Marco Hinz <mh.codebro@gmail.com> | 2015-11-18 13:41:54 +0100 |
---|---|---|
committer | Marco Hinz <mh.codebro@gmail.com> | 2015-11-18 13:41:54 +0100 |
commit | 959f2601f982bb911c83cc6e948f06abd2e9c140 (patch) | |
tree | cba983995683ff90e0b528ea6ab789da5a3a1dca /test/functional/terminal/tui_spec.lua | |
parent | ed06071f1f61f625c3fef46e24b57d563852e4c9 (diff) | |
parent | f480b38a2f28cda9e8eb2d9aa9430f01a4a7064d (diff) | |
download | rneovim-959f2601f982bb911c83cc6e948f06abd2e9c140.tar.gz rneovim-959f2601f982bb911c83cc6e948f06abd2e9c140.tar.bz2 rneovim-959f2601f982bb911c83cc6e948f06abd2e9c140.zip |
Merge PR #3488 'Implement handling of terminal focus events'
Diffstat (limited to 'test/functional/terminal/tui_spec.lua')
-rw-r--r-- | test/functional/terminal/tui_spec.lua | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua index ba0c531c7e..9a1fdfca55 100644 --- a/test/functional/terminal/tui_spec.lua +++ b/test/functional/terminal/tui_spec.lua @@ -148,6 +148,32 @@ describe('tui', function() -- TERMINAL -- | ]]) 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) describe('tui with non-tty file descriptors', function() |