aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/functional/terminal/buffer_spec.lua7
-rw-r--r--test/functional/terminal/mouse_spec.lua14
2 files changed, 19 insertions, 2 deletions
diff --git a/test/functional/terminal/buffer_spec.lua b/test/functional/terminal/buffer_spec.lua
index 0756508a4c..ffdfec4428 100644
--- a/test/functional/terminal/buffer_spec.lua
+++ b/test/functional/terminal/buffer_spec.lua
@@ -170,15 +170,18 @@ describe('terminal buffer', function()
source([[
function! SplitWindow()
new
+ call feedkeys("iabc\<Esc>")
endfunction
startinsert
call jobstart(['sh', '-c', 'exit'], {'on_exit': function("SplitWindow")})
+ call feedkeys("\<C-\>", 't') " vim will expect <C-n>, but be exited out of
+ " the terminal before it can be entered.
]])
-- We should be in a new buffer now.
screen:expect([[
- ^ |
+ ab^c |
~ |
========== |
rows: 2, cols: 50 |
@@ -188,7 +191,7 @@ describe('terminal buffer', function()
]])
neq(tbuf, eval('bufnr("%")'))
- execute('quit') -- Should exit the new window, not the terminal.
+ execute('quit!') -- Should exit the new window, not the terminal.
eq(tbuf, eval('bufnr("%")'))
execute('set laststatus=1') -- Restore laststatus to the default.
diff --git a/test/functional/terminal/mouse_spec.lua b/test/functional/terminal/mouse_spec.lua
index b8f6214f8f..4def4dd7f8 100644
--- a/test/functional/terminal/mouse_spec.lua
+++ b/test/functional/terminal/mouse_spec.lua
@@ -50,6 +50,20 @@ describe('terminal mouse', function()
]])
end)
+ it('will exit focus after <C-\\>, then scrolled', function()
+ feed('<C-\\>')
+ feed('<MouseDown><0,0>')
+ screen:expect([[
+ line23 |
+ line24 |
+ line25 |
+ line26 |
+ line27 |
+ ^line28 |
+ |
+ ]])
+ end)
+
describe('with mouse events enabled by the program', function()
before_each(function()
thelpers.enable_mouse()