# HG changeset patch # User Augie Fackler # Date 2014-11-06 15:57:13 # Node ID d33a90cb2a3202451ee3fd9ecddb0c119611d114 # Parent a0ccb66f344db6351395b5150ecfd13b24071410 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. diff --git a/tests/test-run-tests.t b/tests/test-run-tests.t --- a/tests/test-run-tests.t +++ b/tests/test-run-tests.t @@ -416,22 +416,22 @@ test for --json $ 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)