diff options
Diffstat (limited to 'test/functional/options/defaults_spec.lua')
-rw-r--r-- | test/functional/options/defaults_spec.lua | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/functional/options/defaults_spec.lua b/test/functional/options/defaults_spec.lua index 10a0baa30b..d27fa375ee 100644 --- a/test/functional/options/defaults_spec.lua +++ b/test/functional/options/defaults_spec.lua @@ -1232,3 +1232,22 @@ describe('stdpath()', function() end) end) end) + +describe('autocommands', function() + it('closes terminal with default shell on success', function() + api.nvim_set_option_value('shell', helpers.testprg('shell-test'), {}) + command('set shellcmdflag=EXIT shellredir= shellpipe= shellquote= shellxquote=') + + -- Should not block other events + command('let g:n=0') + command('au BufEnter * let g:n = g:n + 1') + + command('terminal') + eq(eval('get(g:, "n", 0)'), 1) + + helpers.retry(nil, 1000, function() + neq(api.nvim_get_option_value('buftype', { buf = 0 }), 'terminal') + eq(eval('get(g:, "n", 0)'), 2) + end) + end) +end) |