mirror of
https://github.com/neovim/neovim.git
synced 2026-02-22 10:22:17 +10:00
test(terminal/buffer_spec): fix flaky test (#37299)
It turns out that uv_write() doesn't queue the write if there are no
pending writes, so vim.uv.run() isn't needed to reproduce the crash.
(cherry picked from commit 0bd4d3f779)
This commit is contained in:
committed by
github-actions[bot]
parent
4f0e5678f3
commit
ad70c2300e
@@ -443,9 +443,8 @@ describe(':terminal buffer', function()
|
||||
screen:expect_unchanged()
|
||||
--- @type string
|
||||
local title_before_del = exec_lua(function()
|
||||
vim.wait(10) -- Ensure there are no pending events.
|
||||
vim.wait(10) -- Ensure there are no pending events so that a write isn't queued.
|
||||
vim.api.nvim_chan_send(vim.bo.channel, '\027]2;OTHER_TITLE\007')
|
||||
vim.uv.run('once') -- Only process the pending write.
|
||||
vim.uv.sleep(50) -- Block the event loop and wait for tty-test to forward OSC 2.
|
||||
local term_title = vim.b.term_title
|
||||
vim.api.nvim_buf_delete(0, { force = true })
|
||||
|
||||
Reference in New Issue
Block a user