diff options
| author | Mark Pulford <mark@kyne.com.au> | 2011-12-13 23:06:06 +1030 |
|---|---|---|
| committer | Mark Pulford <mark@kyne.com.au> | 2011-12-13 23:06:06 +1030 |
| commit | 8e5aa7cfe7b873b4eb8dd522054e16a67fb66ca8 (patch) | |
| tree | 22e820373823eb0d76e170724eb7be8668a3e285 /tests/test.lua | |
| parent | 2be899558e59230c9fc866f6e004f6b6a17272a4 (diff) | |
| download | lua-cjson-8e5aa7cfe7b873b4eb8dd522054e16a67fb66ca8.tar.gz lua-cjson-8e5aa7cfe7b873b4eb8dd522054e16a67fb66ca8.tar.bz2 lua-cjson-8e5aa7cfe7b873b4eb8dd522054e16a67fb66ca8.zip | |
Update build testing to show test counts/failures
Display failed tests, and successful/total test counts.
Use "awk" to provide a portable "ggrep -E" with context.
Diffstat (limited to '')
| -rwxr-xr-x | tests/test.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test.lua b/tests/test.lua index b7b50d2..90d216c 100755 --- a/tests/test.lua +++ b/tests/test.lua | |||
| @@ -245,4 +245,12 @@ for i = 1, #arg do | |||
| 245 | true, { true }) | 245 | true, { true }) |
| 246 | end | 246 | end |
| 247 | 247 | ||
| 248 | local pass, total = run_test_summary() | ||
| 249 | |||
| 250 | print(string.format("==> Summary: %d/%d tests succeeded", pass, total)) | ||
| 251 | |||
| 252 | if pass ~= total then | ||
| 253 | os.exit(1) | ||
| 254 | end | ||
| 255 | |||
| 248 | -- vi:ai et sw=4 ts=4: | 256 | -- vi:ai et sw=4 ts=4: |
