commit 8c2571991ad748b0ee71529951e1502e553aa8ba
parent af0cd9a9075117319808b8c0515cd86628992baf
Author: fredizzimo <fsundvik@gmail.com>
Date: Sun, 9 Feb 2025 22:44:41 +0700
test: reset cmdline abort state only after expect() has finished #32376
Problem:
cmdline abort state may be reset when intermediate states are received.
Solution:
Reset after `self:_wait()`.
Diffstat:
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/test/functional/ui/screen.lua b/test/functional/ui/screen.lua
@@ -661,12 +661,6 @@ screen:redraw_debug() to show all intermediate screen states.]]
end
end
- -- Only test the abort state of a cmdline level once.
- if self.cmdline_hide_level ~= nil then
- self.cmdline[self.cmdline_hide_level] = nil
- self.cmdline_hide_level = nil
- end
-
if expected.hl_groups ~= nil then
for name, id in pairs(expected.hl_groups) do
local expected_hl = attr_state.ids[id]
@@ -698,6 +692,11 @@ screen:redraw_debug() to show all intermediate screen states.]]
end
end
end, expected)
+ -- Only test the abort state of a cmdline level once.
+ if self.cmdline_hide_level ~= nil then
+ self.cmdline[self.cmdline_hide_level] = nil
+ self.cmdline_hide_level = nil
+ end
end
function Screen:expect_unchanged(intermediate, waittime_ms)