aboutsummaryrefslogtreecommitdiff
path: root/test/functional/terminal
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/terminal')
-rw-r--r--test/functional/terminal/ex_terminal_spec.lua6
-rw-r--r--test/functional/terminal/scrollback_spec.lua2
-rw-r--r--test/functional/terminal/tui_spec.lua28
3 files changed, 31 insertions, 5 deletions
diff --git a/test/functional/terminal/ex_terminal_spec.lua b/test/functional/terminal/ex_terminal_spec.lua
index 3855cf4b65..611ba55793 100644
--- a/test/functional/terminal/ex_terminal_spec.lua
+++ b/test/functional/terminal/ex_terminal_spec.lua
@@ -22,7 +22,7 @@ describe(':terminal', function()
wait()
screen:expect([[
ready $ |
- [Program exited, press any key to close] |
+ [Process exited 0] |
|
|
|
@@ -37,7 +37,7 @@ describe(':terminal', function()
screen:expect([[
ready $ echo hi |
|
- [Program exited, press any key to close] |
+ [Process exited 0] |
|
|
|
@@ -51,7 +51,7 @@ describe(':terminal', function()
screen:expect([[
ready $ echo 'hello' \ "world" |
|
- [Program exited, press any key to close] |
+ [Process exited 0] |
|
|
|
diff --git a/test/functional/terminal/scrollback_spec.lua b/test/functional/terminal/scrollback_spec.lua
index 87cc9a8266..4b56698520 100644
--- a/test/functional/terminal/scrollback_spec.lua
+++ b/test/functional/terminal/scrollback_spec.lua
@@ -340,7 +340,7 @@ describe('terminal prints more lines than the screen height and exits', function
line8 |
line9 |
|
- [Program exited, press any key to close] |
+ [Process exited 0] |
-- TERMINAL -- |
]])
feed('<cr>')
diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua
index 0c4b80fdd2..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()
@@ -167,7 +193,7 @@ describe('tui with non-tty file descriptors', function()
:q |
abc |
|
- [Program exited, press any key to close] |
+ [Process exited 0] |
|
-- TERMINAL -- |
]])