diff options
author | John Wiegley <johnw@newartisans.com> | 2006-08-22 00:52:08 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 02:41:33 -0400 |
commit | 04dfda2282bfb3686336600cfafd1d9653369445 (patch) | |
tree | 9ee02db5c2d33290dfa6060475973f7c378ce643 /tests/confirm.py | |
parent | db0ef2e25731a824aa728315f2f7f6e8a41a5ddf (diff) | |
download | fork-ledger-04dfda2282bfb3686336600cfafd1d9653369445.tar.gz fork-ledger-04dfda2282bfb3686336600cfafd1d9653369445.tar.bz2 fork-ledger-04dfda2282bfb3686336600cfafd1d9653369445.zip |
Made separate modules for the csv command, since the prior method was
not fully correct.
Diffstat (limited to 'tests/confirm.py')
-rwxr-xr-x | tests/confirm.py | 7 |
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) |