aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2021-08-31 07:24:25 -0700
committerGitHub <noreply@github.com>2021-08-31 07:24:25 -0700
commit284199bc4bf36bb74c481da9c8b2a43c1bbbeb51 (patch)
tree336bf2b82126e5efa3d6f149d4a6026ef1a24d54 /test/functional
parent9695691ee4868ea9fdd8a6d84b9980fc22c77aa3 (diff)
parent3c081d028062f793b63b8689f854bbea30e15752 (diff)
downloadrneovim-284199bc4bf36bb74c481da9c8b2a43c1bbbeb51.tar.gz
rneovim-284199bc4bf36bb74c481da9c8b2a43c1bbbeb51.tar.bz2
rneovim-284199bc4bf36bb74c481da9c8b2a43c1bbbeb51.zip
Merge #15402 fix(terminal): close without ! if the job is stopped
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/terminal/buffer_spec.lua18
1 files changed, 17 insertions, 1 deletions
diff --git a/test/functional/terminal/buffer_spec.lua b/test/functional/terminal/buffer_spec.lua
index c61bf108cb..c0af932e68 100644
--- a/test/functional/terminal/buffer_spec.lua
+++ b/test/functional/terminal/buffer_spec.lua
@@ -7,6 +7,7 @@ local eq, neq = helpers.eq, helpers.neq
local write_file = helpers.write_file
local command= helpers.command
local exc_exec = helpers.exc_exec
+local matches = helpers.matches
describe(':terminal buffer', function()
local screen
@@ -255,8 +256,23 @@ describe(':terminal buffer', function()
command('bdelete!')
end)
- it('handles wqall', function()
+ it('requires bang (!) to close a running job #15402', function()
eq('Vim(wqall):E948: Job still running', exc_exec('wqall'))
+ for _, cmd in ipairs({ 'bdelete', '%bdelete', 'bwipeout', 'bunload' }) do
+ matches('^Vim%('..cmd:gsub('%%', '')..'%):E89: term://.*tty%-test.* will be killed %(add %! to override%)$',
+ exc_exec(cmd))
+ end
+ command('call jobstop(&channel)')
+ assert(0 >= eval('jobwait([&channel], 1000)[0]'))
+ command('bdelete')
+ end)
+
+ it('stops running jobs with :quit', function()
+ -- Open in a new window to avoid terminating the nvim instance
+ command('split')
+ command('terminal')
+ command('set nohidden')
+ command('quit')
end)
it('does not segfault when pasting empty buffer #13955', function()