summaryrefslogtreecommitdiff
path: root/tests/runner.lua
diff options
context:
space:
mode:
authorOpportunityLiu <[email protected]>2019-06-09 11:13:02 +0800
committerOpportunityLiu <[email protected]>2019-06-09 11:13:02 +0800
commitdca7c26579f7d7857810b58f95e177877f9933fa (patch)
treecd778ea593c68922ca15db40b99fe6a34d77853c /tests/runner.lua
parent107c658ad2dade146ac368a77efeba15e29e6a93 (diff)
fix code style
Diffstat (limited to 'tests/runner.lua')
-rw-r--r--tests/runner.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/runner.lua b/tests/runner.lua
index 6ec74a35c..f84b453ba 100644
--- a/tests/runner.lua
+++ b/tests/runner.lua
@@ -36,7 +36,7 @@ function main(script)
local old_dir = os.cd(root)
-- get test functions
- local data = import("test", { root_dir = root })
+ local data = import("test", { anonymous = true })
if data.main then
-- ignore everthing when we found a main function
@@ -50,11 +50,13 @@ function main(script)
if verbose then print(">> running %s ...", k) end
context.func = v
context.funcname = k
- try{
+ try
+ {
function ()
v(context)
end,
- catch{
+ catch
+ {
function (error)
if not error:find("aborting because of ") then
print_error(error, v, "unhandled error")
@@ -67,7 +69,7 @@ function main(script)
succeed_count = succeed_count + 1
end
end
- if verbose then print(">> finined %d test method(s) ...", succeed_count) end
+ if verbose then print(">> finished %d test method(s) ...", succeed_count) end
-- leave script directory
os.cd(old_dir)