diff options
author | Mark Pulford <mark@kyne.com.au> | 2011-05-16 00:08:00 +0930 |
---|---|---|
committer | Mark Pulford <mark@kyne.com.au> | 2011-05-16 00:08:00 +0930 |
commit | 2cb7a17e3e5a0bab761661e193ffbea146dade73 (patch) | |
tree | 0da314b86023464d9e68070869004e8851cffb5f /tests/common.lua | |
parent | 35e81a9c4143890771553c38dce0719630b37517 (diff) | |
download | lua-cjson-2cb7a17e3e5a0bab761661e193ffbea146dade73.tar.gz lua-cjson-2cb7a17e3e5a0bab761661e193ffbea146dade73.tar.bz2 lua-cjson-2cb7a17e3e5a0bab761661e193ffbea146dade73.zip |
Warn that a failed NaN test may not be an error
Sprintf returns "-nan" rather than "nan" on some platforms, which causes
the test script to incorrectly flag a failure.
Also allow test functions without "==> Config" output.
Diffstat (limited to 'tests/common.lua')
-rw-r--r-- | tests/common.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/common.lua b/tests/common.lua index 156f882..47e3f56 100644 --- a/tests/common.lua +++ b/tests/common.lua | |||
@@ -231,7 +231,9 @@ end | |||
231 | function run_test_group(testgroup, tests) | 231 | function run_test_group(testgroup, tests) |
232 | local function run_config(configname, func) | 232 | local function run_config(configname, func) |
233 | local success, msg = pcall(func) | 233 | local success, msg = pcall(func) |
234 | print(string.format("==> Config %s: %s", configname, msg)) | 234 | if msg then |
235 | print(string.format("==> Config %s: %s", configname, msg)) | ||
236 | end | ||
235 | print() | 237 | print() |
236 | end | 238 | end |
237 | 239 | ||