aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-01-04 08:39:20 +0800
committerGitHub <noreply@github.com>2023-01-04 08:39:20 +0800
commitef18c9f9b05caf1f39ed32762f53802e378f143b (patch)
treeff82f10a2aa372e0b55b539eea4a337558779549
parent63e0e77bd96f2541411725e7c5e219cf556fc7b1 (diff)
downloadrneovim-ef18c9f9b05caf1f39ed32762f53802e378f143b.tar.gz
rneovim-ef18c9f9b05caf1f39ed32762f53802e378f143b.tar.bz2
rneovim-ef18c9f9b05caf1f39ed32762f53802e378f143b.zip
test(tui_spec): avoid race between nvim_paste and nvim_input (#21639)
Now that the TUI calls nvim_paste and nvim_input through RPC, the data race is much more likely, as nvim_paste is deferred while nvim_input is not. Add an expect_child_buf_lines() call to avoid the race.
-rw-r--r--test/functional/terminal/tui_spec.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua
index 964fc8941d..7c2269e453 100644
--- a/test/functional/terminal/tui_spec.lua
+++ b/test/functional/terminal/tui_spec.lua
@@ -1076,8 +1076,7 @@ describe('TUI', function()
wait_for_mode('i')
-- "bracketed paste"
feed_data('\027[200~'..expected..'\027[201~')
- -- FIXME: Data race between the two feeds
- if is_os('freebsd') then screen:sleep(1) end
+ expect_child_buf_lines({expected})
feed_data(' end')
expected = expected..' end'
screen:expect([[