aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/functional/helpers.lua3
-rw-r--r--test/functional/ui/screen.lua3
2 files changed, 4 insertions, 2 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
index 2473fc0d3b..a6ff10c0a4 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -1,4 +1,5 @@
require('coxpcall')
+local busted = require('busted')
local luv = require('luv')
local lfs = require('lfs')
local mpack = require('mpack')
@@ -385,7 +386,7 @@ function module.retry(max, max_ms, fn)
end
luv.update_time() -- Update cached value of luv.now() (libuv: uv_now()).
if (max and tries >= max) or (luv.now() - start_time > timeout) then
- error("\nretry() attempts: "..tostring(tries).."\n"..tostring(result))
+ busted.fail(string.format("retry() attempts: %d\n%s", tries, tostring(result)), 2)
end
tries = tries + 1
luv.sleep(20) -- Avoid hot loop...
diff --git a/test/functional/ui/screen.lua b/test/functional/ui/screen.lua
index 8bc1e14e13..b57e13fea1 100644
--- a/test/functional/ui/screen.lua
+++ b/test/functional/ui/screen.lua
@@ -71,6 +71,7 @@
-- To debug screen tests, see Screen:redraw_debug().
local helpers = require('test.functional.helpers')(nil)
+local busted = require('busted')
local deepcopy = helpers.deepcopy
local shallowcopy = helpers.shallowcopy
local concat_tables = helpers.concat_tables
@@ -574,7 +575,7 @@ asynchronous (feed(), nvim_input()) and synchronous API calls.
if err then
- assert(false, err)
+ busted.fail(err, 3)
elseif did_warn then
local tb = debug.traceback()
local index = string.find(tb, '\n%s*%[C]')