summaryrefslogtreecommitdiff
path: root/test/RegressTests.py
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-03-23 04:02:01 -0500
committerJohn Wiegley <johnw@newartisans.com>2012-03-23 04:02:01 -0500
commitb5664ce2efdd698448f93dbe1248e7f8aeefe3fa (patch)
tree519108bbbbf44cd560d9a02bb8e0cdd62ae463df /test/RegressTests.py
parent5cffbf16e94cffc1b62ef80f6fb4ef8c1356db41 (diff)
downloadfork-ledger-b5664ce2efdd698448f93dbe1248e7f8aeefe3fa.tar.gz
fork-ledger-b5664ce2efdd698448f93dbe1248e7f8aeefe3fa.tar.bz2
fork-ledger-b5664ce2efdd698448f93dbe1248e7f8aeefe3fa.zip
Allow use of $FILE in stdout checks
Diffstat (limited to 'test/RegressTests.py')
-rwxr-xr-xtest/RegressTests.py5
1 files changed, 2 insertions, 3 deletions
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