-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestSummary.lua
More file actions
25 lines (21 loc) · 937 Bytes
/
Copy pathTestSummary.lua
File metadata and controls
25 lines (21 loc) · 937 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
local summary={
{name='LuaAideTest', passed=84, failed=0, failedtests={}},
{name='moduletest_vec3', passed=11, failed=0, failedtests={}},
{name='moduletest_timestamp', passed=7, failed=0, failedtests={}},
{name='moduletest_colorenum', passed=6, failed=0, failedtests={}}
}
print(string.format("%2s: %4s|%-4s %s (%s)", "#", "ok", "fail", "testname", "failed tests"))
for j,r in ipairs(summary) do
if r.filenotfound then
print(string.format("%2d: %4s|%-4s %s (file not found: '%s')", j, "-", "-", r.name, r.filenotfound))
else
local F=table.concat(r.failedtests, ", ")
print(string.format("%2d: %4d|%-4d %s (%s)", j, r.passed, r.failed, r.name, F))
end
end
print [[
To execute tests directly:
./LuaAideTest
lua examples/moduletest_vec3.lua
lua examples/moduletest_timestamp.lua
lua examples/moduletest_colorenum.lua]]