summaryrefslogtreecommitdiff
path: root/tests/confirm.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/confirm.py')
-rwxr-xr-xtests/confirm.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/confirm.py b/tests/confirm.py
index 0881001b..f4947224 100755
--- a/tests/confirm.py
+++ b/tests/confirm.py
@@ -17,8 +17,11 @@ errors = 0
report = sys.argv[1]
for line in os.popen("./ledger -f utils/standard.dat -e 2004/4 %s reg %s" %
(report, sys.argv[2])):
- value = clean(line[55:67])
- total = clean(line[68:])
+ match = re.match("\\s*([-$,0-9.]+)\\s+([-$,0-9.]+)", line[55:])
+ if not match:
+ continue
+ value = clean(match.group(1))
+ total = clean(match.group(2))
running_total += value
diff = abs(running_total - total)