changeset 12373:58885f00b998

tests: don't match blank output lines as regexes in unified tests Currently, the following unified test will pass: $ echo foo A blank output line (a line containing just two spaces) will match any output. The patch modifies the unified test runner to ignore empty strings strings when do regular expression matching.
author Brodie Rao <brodie@bitheap.org>
date Wed, 22 Sep 2010 16:05:59 -0500
parents 5163e3c8aa52
children 4e7dd28db0dd
files tests/run-tests.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Wed Sep 22 16:05:58 2010 -0500
+++ b/tests/run-tests.py	Wed Sep 22 16:05:59 2010 -0500
@@ -530,7 +530,7 @@
 
             if el == l: # perfect match (fast)
                 postout.append("  " + l)
-            elif el and rematch(el, l): # fallback regex match
+            elif el and el[2:] and rematch(el, l): # fallback regex match
                 postout.append("  " + el)
             else: # mismatch - let diff deal with it
                 postout.append("  " + l)