aboutsummaryrefslogtreecommitdiff
path: root/test/functional/terminal/buffer_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/terminal/buffer_spec.lua')
-rw-r--r--test/functional/terminal/buffer_spec.lua22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/functional/terminal/buffer_spec.lua b/test/functional/terminal/buffer_spec.lua
index 4ce33fef7b..c290031fbe 100644
--- a/test/functional/terminal/buffer_spec.lua
+++ b/test/functional/terminal/buffer_spec.lua
@@ -201,6 +201,28 @@ describe('terminal buffer', function()
feed([[<C-\><C-n>]])
feed_command('bdelete!')
end)
+
+ describe('handles confirmations', function()
+ it('with :confirm', function()
+ feed_command('terminal')
+ feed('<c-\\><c-n>')
+ feed_command('confirm bdelete')
+ screen:expect('Close "term://', nil, true, nil, true)
+ end)
+
+ it('with &confirm', function()
+ feed_command('terminal')
+ feed('<c-\\><c-n>')
+ feed_command('bdelete')
+ screen:expect('E89', nil, true, nil, true)
+ feed('<cr>')
+ eq('terminal', eval('&buftype'))
+ feed_command('set confirm | bdelete')
+ screen:expect('Close "term://', nil, true, nil, true)
+ feed('y')
+ neq('terminal', eval('&buftype'))
+ end)
+ end)
end)
describe('No heap-buffer-overflow when using', function()