Software / code / prosody
Comparison
tests/test.lua @ 306:db4ef011512c
Merge with myself (!)
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Sat, 15 Nov 2008 23:22:27 +0000 |
| parent | 301:fcb7e63630ae |
| child | 337:4a1dd1c2c219 |
comparison
equal
deleted
inserted
replaced
| 305:4ccffcd6e720 | 306:db4ef011512c |
|---|---|
| 69 end | 69 end |
| 70 end | 70 end |
| 71 end | 71 end |
| 72 | 72 |
| 73 function runtest(f, msg) | 73 function runtest(f, msg) |
| 74 if not f then print("SUBTEST NOT FOUND: "..(msg or "(no description)")); return; end | |
| 74 local success, ret = pcall(f); | 75 local success, ret = pcall(f); |
| 75 if success and verbosity >= 2 then | 76 if success and verbosity >= 2 then |
| 76 print("SUBTEST PASSED: "..(msg or "(no description)")); | 77 print("SUBTEST PASSED: "..(msg or "(no description)")); |
| 77 elseif (not success) and verbosity >= 1 then | 78 elseif (not success) and verbosity >= 1 then |
| 78 print("SUBTEST FAILED: "..(msg or "(no description)")); | 79 print("SUBTEST FAILED: "..(msg or "(no description)")); |