aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-11-22 08:08:12 +0800
committerGitHub <noreply@github.com>2024-11-22 08:08:12 +0800
commit359763307546ae7a401e9458fefeb6f4cd37a40f (patch)
treef0a23e4a4172de6042dd8a8c3c831a47e1996e28
parentff75f345ab5fa57c6560db021e8eb099aff90472 (diff)
downloadrneovim-359763307546ae7a401e9458fefeb6f4cd37a40f.tar.gz
rneovim-359763307546ae7a401e9458fefeb6f4cd37a40f.tar.bz2
rneovim-359763307546ae7a401e9458fefeb6f4cd37a40f.zip
test(autocmd/termxx_spec): fix TextChangedT test flakiness (#31296)
Problem: The E937 error appears for too short in TextChangedT test. Solution: Only feed an Enter key after seeing the error.
-rw-r--r--test/functional/autocmd/termxx_spec.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/functional/autocmd/termxx_spec.lua b/test/functional/autocmd/termxx_spec.lua
index baf2bb6071..950ef2f58a 100644
--- a/test/functional/autocmd/termxx_spec.lua
+++ b/test/functional/autocmd/termxx_spec.lua
@@ -213,9 +213,11 @@ describe('autocmd TextChangedT', function()
end)
it('cannot delete terminal buffer', function()
- command([[autocmd TextChangedT * call nvim_input('<CR>') | bwipe!]])
+ command('autocmd TextChangedT * bwipe!')
tt.feed_data('a')
screen:expect({ any = 'E937: ' })
+ feed('<CR>')
+ command('autocmd! TextChangedT')
matches(
'^E937: Attempt to delete a buffer that is in use: term://',
api.nvim_get_vvar('errmsg')