From b5664ce2efdd698448f93dbe1248e7f8aeefe3fa Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 23 Mar 2012 04:02:01 -0500 Subject: Allow use of $FILE in stdout checks --- test/RegressTests.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/RegressTests.py b/test/RegressTests.py index a22e35bf..72667311 100755 --- a/test/RegressTests.py +++ b/test/RegressTests.py @@ -40,6 +40,7 @@ class RegressFile(object): def transform_line(self, line): line = re.sub('\$sourcepath', harness.sourcepath, line) + line = re.sub('\$FILE', self.filename, line) return line def read_test(self): @@ -130,9 +131,7 @@ class RegressFile(object): printed = False index = 0 if test['error'] is not None: - for line in unified_diff([re.sub('\$FILE', self.filename, line) - for line in test['error']], - harness.readlines(p.stderr)): + for line in unified_diff(test['error'], harness.readlines(p.stderr)): index += 1 if index < 3: continue -- cgit v1.2.3