aboutsummaryrefslogtreecommitdiff
path: root/test/functional/autocmd/termxx_spec.lua
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2023-01-14 23:10:03 -0700
committerJosh Rahm <joshuarahm@gmail.com>2023-01-14 23:10:03 -0700
commit396c48d54ef313ca02e2e97849e51721094400cd (patch)
tree87857ac4a5a7f88e2ebc519e73df061f9ed2f8e1 /test/functional/autocmd/termxx_spec.lua
parent968aa6e3ed0497ea99f123c74c5fd0f3880ccc63 (diff)
parent6134c1e8a39a5e61d0593613343a5923a86e3545 (diff)
downloadrneovim-396c48d54ef313ca02e2e97849e51721094400cd.tar.gz
rneovim-396c48d54ef313ca02e2e97849e51721094400cd.tar.bz2
rneovim-396c48d54ef313ca02e2e97849e51721094400cd.zip
Merge remote-tracking branch 'upstream/master' into userreg
Diffstat (limited to 'test/functional/autocmd/termxx_spec.lua')
-rw-r--r--test/functional/autocmd/termxx_spec.lua13
1 files changed, 8 insertions, 5 deletions
diff --git a/test/functional/autocmd/termxx_spec.lua b/test/functional/autocmd/termxx_spec.lua
index 859c2ebf44..4717b1fa2e 100644
--- a/test/functional/autocmd/termxx_spec.lua
+++ b/test/functional/autocmd/termxx_spec.lua
@@ -5,11 +5,13 @@ local clear, command, nvim, testprg =
helpers.clear, helpers.command, helpers.nvim, helpers.testprg
local eval, eq, neq, retry =
helpers.eval, helpers.eq, helpers.neq, helpers.retry
+local matches = helpers.matches
local ok = helpers.ok
local feed = helpers.feed
local pcall_err = helpers.pcall_err
local assert_alive = helpers.assert_alive
-local iswin = helpers.iswin
+local skip = helpers.skip
+local is_os = helpers.is_os
describe('autocmd TermClose', function()
before_each(function()
@@ -22,7 +24,8 @@ describe('autocmd TermClose', function()
local function test_termclose_delete_own_buf()
command('autocmd TermClose * bdelete!')
command('terminal')
- eq('Vim(bdelete):E937: Attempt to delete a buffer that is in use', pcall_err(command, 'bdelete!'))
+ matches('^Vim%(bdelete%):E937: Attempt to delete a buffer that is in use: term://',
+ pcall_err(command, 'bdelete!'))
assert_alive()
end
@@ -45,7 +48,7 @@ describe('autocmd TermClose', function()
end)
it('triggers when long-running terminal job gets stopped', function()
- nvim('set_option', 'shell', iswin() and 'cmd.exe' or 'sh')
+ nvim('set_option', 'shell', is_os('win') and 'cmd.exe' or 'sh')
command('autocmd TermClose * let g:test_termclose = 23')
command('terminal')
command('call jobstop(b:terminal_job_id)')
@@ -53,7 +56,7 @@ describe('autocmd TermClose', function()
end)
it('kills job trapping SIGTERM', function()
- if iswin() then return end
+ skip(is_os('win'))
nvim('set_option', 'shell', 'sh')
nvim('set_option', 'shellcmdflag', '-c')
command([[ let g:test_job = jobstart('trap "" TERM && echo 1 && sleep 60', { ]]
@@ -73,7 +76,7 @@ describe('autocmd TermClose', function()
end)
it('kills PTY job trapping SIGHUP and SIGTERM', function()
- if iswin() then return end
+ skip(is_os('win'))
nvim('set_option', 'shell', 'sh')
nvim('set_option', 'shellcmdflag', '-c')
command([[ let g:test_job = jobstart('trap "" HUP TERM && echo 1 && sleep 60', { ]]