Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Fail a unit check run that made no check
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/extensions/harness.lua | 5 |
1 file changed, 5 insertions, 0 deletions
diff --git a/tests/extensions/harness.lua b/tests/extensions/harness.lua index b54f727..1e2fe08 100644 --- a/tests/extensions/harness.lua +++ b/tests/extensions/harness.lua @@ -279,11 +279,16 @@ function harness.excludes(name, haystack, needle) end end +-- A run that made no check proves nothing, so it fails as well. function harness.finish() if failures > 0 then io.write(failures, " of ", checks, " checks failed\n") os.exit(1) end + if checks == 0 then + io.write("no checks ran\n") + os.exit(1) + end io.write("passed ", checks, " checks\n") os.exit(0) end |
