# HG changeset patch # User Brodie Rao # Date 1285189559 18000 # Node ID bca8ef6e70b36728ea805c7f408bd1d7dcb59b38 # Parent f0d8ac85ca21b43bfd6147a8ec9663ca1fa7006a 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. [ original upstream message ] diff -r f0d8ac85ca21 -r bca8ef6e70b3 tests/run-tests.py --- 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)