From 673ee213e9d0900b1fa2638dc5373ee8167ed4fa Mon Sep 17 00:00:00 2001 From: Gregory Anders Date: Sat, 4 Sep 2021 15:28:08 -0600 Subject: 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. --- test/functional/autocmd/termxx_spec.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/functional/autocmd') 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 ', function() command('set hidden') + command('set shellcmdflag=EXE') command('autocmd TermClose * let g:abuf = expand("")') 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') -- cgit