aboutsummaryrefslogtreecommitdiff
path: root/test/functional/autocmd/termxx_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/autocmd/termxx_spec.lua')
-rw-r--r--test/functional/autocmd/termxx_spec.lua16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/functional/autocmd/termxx_spec.lua b/test/functional/autocmd/termxx_spec.lua
index caa7209de1..0243fdf600 100644
--- a/test/functional/autocmd/termxx_spec.lua
+++ b/test/functional/autocmd/termxx_spec.lua
@@ -2,7 +2,7 @@ local uv = vim.uv
local helpers = require('test.functional.helpers')(after_each)
local thelpers = require('test.functional.terminal.helpers')
-local clear, command, nvim, testprg = helpers.clear, helpers.command, helpers.nvim, helpers.testprg
+local clear, command, testprg = helpers.clear, helpers.command, helpers.testprg
local eval, eq, neq, retry = helpers.eval, helpers.eq, helpers.neq, helpers.retry
local matches = helpers.matches
local ok = helpers.ok
@@ -16,13 +16,13 @@ local is_os = helpers.is_os
describe('autocmd TermClose', function()
before_each(function()
clear()
- nvim('set_option_value', 'shell', testprg('shell-test'), {})
+ meths.nvim_set_option_value('shell', testprg('shell-test'), {})
command('set shellcmdflag=EXE shellredir= shellpipe= shellquote= shellxquote=')
end)
local function test_termclose_delete_own_buf()
-- The terminal process needs to keep running so that TermClose isn't triggered immediately.
- nvim('set_option_value', 'shell', string.format('"%s" INTERACT', testprg('shell-test')), {})
+ meths.nvim_set_option_value('shell', string.format('"%s" INTERACT', testprg('shell-test')), {})
command('autocmd TermClose * bdelete!')
command('terminal')
matches(
@@ -56,7 +56,7 @@ describe('autocmd TermClose', function()
it('triggers when long-running terminal job gets stopped', function()
skip(is_os('win'))
- nvim('set_option_value', 'shell', is_os('win') and 'cmd.exe' or 'sh', {})
+ meths.nvim_set_option_value('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)')
@@ -67,8 +67,8 @@ describe('autocmd TermClose', function()
it('kills job trapping SIGTERM', function()
skip(is_os('win'))
- nvim('set_option_value', 'shell', 'sh', {})
- nvim('set_option_value', 'shellcmdflag', '-c', {})
+ meths.nvim_set_option_value('shell', 'sh', {})
+ meths.nvim_set_option_value('shellcmdflag', '-c', {})
command(
[[ let g:test_job = jobstart('trap "" TERM && echo 1 && sleep 60', { ]]
.. [[ 'on_stdout': {-> execute('let g:test_job_started = 1')}, ]]
@@ -93,8 +93,8 @@ describe('autocmd TermClose', function()
it('kills PTY job trapping SIGHUP and SIGTERM', function()
skip(is_os('win'))
- nvim('set_option_value', 'shell', 'sh', {})
- nvim('set_option_value', 'shellcmdflag', '-c', {})
+ meths.nvim_set_option_value('shell', 'sh', {})
+ meths.nvim_set_option_value('shellcmdflag', '-c', {})
command(
[[ let g:test_job = jobstart('trap "" HUP TERM && echo 1 && sleep 60', { ]]
.. [[ 'pty': 1,]]