aboutsummaryrefslogtreecommitdiff
path: root/test/functional/autocmd
diff options
context:
space:
mode:
authorGregory Anders <greg@gpanders.com>2021-09-04 15:28:08 -0600
committerGregory Anders <greg@gpanders.com>2023-08-10 09:08:25 -0500
commit673ee213e9d0900b1fa2638dc5373ee8167ed4fa (patch)
tree94abb447f78f33d4367f5848444993074f23214f /test/functional/autocmd
parent0c89854da1893c9d9d5da1994bea69df31fc2a6f (diff)
downloadrneovim-673ee213e9d0900b1fa2638dc5373ee8167ed4fa.tar.gz
rneovim-673ee213e9d0900b1fa2638dc5373ee8167ed4fa.tar.bz2
rneovim-673ee213e9d0900b1fa2638dc5373ee8167ed4fa.zip
test: update tests for auto-closing :term buffers
The terminal buffer closes automatically when using `:terminal` and the command exits without an error. This messes up some tests that expect the terminal buffer to still be open. We can force the buffer not to close by passing an argument to `:terminal`. This can be anything, since the shell-test stub simply prints whatever argument it's given.
Diffstat (limited to 'test/functional/autocmd')
-rw-r--r--test/functional/autocmd/termxx_spec.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/functional/autocmd/termxx_spec.lua b/test/functional/autocmd/termxx_spec.lua
index 359203f945..802020494b 100644
--- a/test/functional/autocmd/termxx_spec.lua
+++ b/test/functional/autocmd/termxx_spec.lua
@@ -103,12 +103,13 @@ describe('autocmd TermClose', function()
it('reports the correct <abuf>', function()
command('set hidden')
+ command('set shellcmdflag=EXE')
command('autocmd TermClose * let g:abuf = expand("<abuf>")')
command('edit foo')
command('edit bar')
eq(2, eval('bufnr("%")'))
- command('terminal')
+ command('terminal ls')
retry(nil, nil, function() eq(3, eval('bufnr("%")')) end)
command('buffer 1')