changeset 23245:d33a90cb2a32 stable

test-run-tests: accept more levels of precision and trailing ws (issue4440) simplejson produces slightly different output from the built-in json module, specifically: * It uses 0.000 instead of 0.0000 * It likes to put a trailing space after a comma This change works around both of those variations.
author Augie Fackler <raf@durin42.com>
date Thu, 06 Nov 2014 10:57:13 -0500
parents a0ccb66f344d
children 643c58303fb0
files tests/test-run-tests.t
diffstat 1 files changed, 14 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-run-tests.t	Wed Nov 05 21:33:45 2014 -0500
+++ b/tests/test-run-tests.t	Thu Nov 06 10:57:13 2014 -0500
@@ -416,22 +416,22 @@
   $ cat report.json
   testreport ={
       "test-failure.t": [\{] (re)
-          "csys": "\s*[\d\.]{5}",  (re)
-          "cuser": "\s*[\d\.]{5}",  (re)
-          "result": "failure", 
-          "time": "\s*[\d\.]{5}" (re)
-      }, 
+          "csys": "\s*[\d\.]{4,5}", ? (re)
+          "cuser": "\s*[\d\.]{4,5}", ? (re)
+          "result": "failure", ? (re)
+          "time": "\s*[\d\.]{4,5}" (re)
+      }, ? (re)
       "test-skip.t": {
-          "csys": "\s*[\d\.]{5}",  (re)
-          "cuser": "\s*[\d\.]{5}",  (re)
-          "result": "skip", 
-          "time": "\s*[\d\.]{5}" (re)
-      }, 
+          "csys": "\s*[\d\.]{4,5}", ? (re)
+          "cuser": "\s*[\d\.]{4,5}", ? (re)
+          "result": "skip", ? (re)
+          "time": "\s*[\d\.]{4,5}" (re)
+      }, ? (re)
       "test-success.t": [\{] (re)
-          "csys": "\s*[\d\.]{5}",  (re)
-          "cuser": "\s*[\d\.]{5}",  (re)
-          "result": "success", 
-          "time": "\s*[\d\.]{5}" (re)
+          "csys": "\s*[\d\.]{4,5}", ? (re)
+          "cuser": "\s*[\d\.]{4,5}", ? (re)
+          "result": "success", ? (re)
+          "time": "\s*[\d\.]{4,5}" (re)
       }
   } (no-eol)