diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-03-01 09:56:25 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-01 09:56:25 +0800 |
commit | aa840ab5668aa9bc013461a48da771f778b39e49 (patch) | |
tree | c9d1130ce27d58e8fa074714bdb697962f9144bf | |
parent | 999fe9468862e22fa5317585f67f5cb32683fc15 (diff) | |
download | rneovim-aa840ab5668aa9bc013461a48da771f778b39e49.tar.gz rneovim-aa840ab5668aa9bc013461a48da771f778b39e49.tar.bz2 rneovim-aa840ab5668aa9bc013461a48da771f778b39e49.zip |
test(termxx_spec): fix TermClose bdelete test flakiness (#22463)
Problem:
If shell-test finishes before the next RPC call, TermClose has already
been triggered, so the test fails.
Solution:
Add INTERACT argument so that shell-test keeps running.
-rw-r--r-- | test/functional/autocmd/termxx_spec.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/functional/autocmd/termxx_spec.lua b/test/functional/autocmd/termxx_spec.lua index 0a33f1b2ac..63b5617eef 100644 --- a/test/functional/autocmd/termxx_spec.lua +++ b/test/functional/autocmd/termxx_spec.lua @@ -22,6 +22,8 @@ describe('autocmd TermClose', function() local function test_termclose_delete_own_buf() + -- The terminal process needs to keep running so that TermClose isn't triggered immediately. + nvim('set_option', 'shell', string.format('"%s" INTERACT', testprg('shell-test'))) command('autocmd TermClose * bdelete!') command('terminal') matches('^TermClose Autocommands for "%*": Vim%(bdelete%):E937: Attempt to delete a buffer that is in use: term://', |