aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/fold_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-02-15 07:26:55 +0800
committerGitHub <noreply@github.com>2023-02-15 07:26:55 +0800
commit05faa8f30ad770d4e4ead41cec601ccced8fb97f (patch)
tree23680deec8f90b7159c23f19f0a7a042ac1941f7 /test/functional/ui/fold_spec.lua
parent556f8646c01d1751cf39fe4df9c622899dceab9d (diff)
downloadrneovim-05faa8f30ad770d4e4ead41cec601ccced8fb97f.tar.gz
rneovim-05faa8f30ad770d4e4ead41cec601ccced8fb97f.tar.bz2
rneovim-05faa8f30ad770d4e4ead41cec601ccced8fb97f.zip
test: make expect_unchanged() less confusing (#22255)
Problem: The sleep before collecting the initial screen state is confusing and may lead to unexpected success if it comes after a blocking RPC call. Solution: Remove that sleep and add an "intermediate" argument.
Diffstat (limited to 'test/functional/ui/fold_spec.lua')
-rw-r--r--test/functional/ui/fold_spec.lua9
1 files changed, 2 insertions, 7 deletions
diff --git a/test/functional/ui/fold_spec.lua b/test/functional/ui/fold_spec.lua
index 420a4654f8..c8a3397a86 100644
--- a/test/functional/ui/fold_spec.lua
+++ b/test/functional/ui/fold_spec.lua
@@ -10,7 +10,6 @@ local meths = helpers.meths
local exec = helpers.exec
local exec_lua = helpers.exec_lua
local assert_alive = helpers.assert_alive
-local poke_eventloop = helpers.poke_eventloop
local content1 = [[
@@ -30,8 +29,6 @@ describe("folded lines", function()
local function with_ext_multigrid(multigrid)
local screen
before_each(function()
- clear()
- command('hi VertSplit gui=reverse')
screen = Screen.new(45, 8)
screen:attach({rgb=true, ext_multigrid=multigrid})
screen:set_default_attr_ids({
@@ -166,12 +163,10 @@ describe("folded lines", function()
end
-- CursorLine is applied correctly with screenrow motions #22232
feed("jgk")
- poke_eventloop()
- screen:expect_unchanged()
+ screen:expect_unchanged(true)
-- CursorLine is applied correctly when closing a fold when cursor is not at fold start
feed("zo4Gzc")
- poke_eventloop()
- screen:expect_unchanged()
+ screen:expect_unchanged(true)
command("set cursorlineopt=line")
if multigrid then
screen:expect([[