summaryrefslogtreecommitdiff
path: root/tests/runner.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2024-04-08 23:49:44 +0800
committerruki <[email protected]>2024-04-08 23:49:44 +0800
commit6551d9a4308d0cbec4a2f4c33d28f8bf432bff7f (patch)
treec1aecbbf4e4e272ba20ebc0651e9fb831318686d /tests/runner.lua
parent34dff00dcb274280b6ee8e23eda03a470b6956b5 (diff)
improve runner
Diffstat (limited to 'tests/runner.lua')
-rw-r--r--tests/runner.lua11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/runner.lua b/tests/runner.lua
index c99142170..4558c38ce 100644
--- a/tests/runner.lua
+++ b/tests/runner.lua
@@ -50,11 +50,14 @@ function main(script)
end,
catch
{
- function (error)
- if not error:find("aborting because of ") then
- context:print_error(error, v, "unhandled error")
+ function (errors)
+ if errors then
+ error = tostring(errors)
+ end
+ if not errors:find("aborting because of ") then
+ context:print_error(errors, v, "unhandled error")
else
- raise(error)
+ raise(errors)
end
end
}