aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/screen.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/ui/screen.lua')
-rw-r--r--test/functional/ui/screen.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/functional/ui/screen.lua b/test/functional/ui/screen.lua
index ff22321e4e..8e7d1ed798 100644
--- a/test/functional/ui/screen.lua
+++ b/test/functional/ui/screen.lua
@@ -147,17 +147,21 @@ function Screen:expect(expected, attr_ids)
end
function Screen:_wait(check, timeout)
- local err
+ local err, checked = false
local function notification_cb(method, args)
assert(method == 'redraw')
self:_redraw(args)
err = check()
+ checked = true
if not err then
stop()
end
return true
end
run(nil, notification_cb, nil, timeout or 5000)
+ if not checked then
+ err = check()
+ end
if err then
error(err)
end