mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
test: retry(): Report number of retries. (#6475)
tui_spec.lua: Retry the terminal-mode test.
This commit is contained in:
@@ -246,12 +246,13 @@ local function retry(max, max_ms, fn)
|
||||
return result
|
||||
end
|
||||
if (max and tries >= max) or (luv.now() - start_time > timeout) then
|
||||
break
|
||||
if type(result) == "string" then
|
||||
result = "\nretry() attempts: "..tostring(tries).."\n"..result
|
||||
end
|
||||
error(result)
|
||||
end
|
||||
tries = tries + 1
|
||||
end
|
||||
-- Do not use pcall() for the final attempt, let the failure bubble up.
|
||||
return fn()
|
||||
end
|
||||
|
||||
local function clear(...)
|
||||
|
||||
Reference in New Issue
Block a user