More fixes to tools/regtest

This commit is contained in:
John Wiegley 2009-02-25 01:41:23 -04:00
parent ac8e27a4b8
commit 838338e316
3 changed files with 4 additions and 16 deletions

View file

@ -21,7 +21,7 @@ errors = 0
args = sys.argv[1]
for line in os.popen(re.sub('\$cmd', 'reg', args)):
match = re.match("\\s*([-$,0-9.]+)\\s+([-$,0-9.]+)", line[55:])
match = re.match("\\s*([-$,0-9.]+)\\s+([-$,0-9.]+)", line[54:])
if not match:
continue
value = clean(match.group(1))
@ -29,7 +29,7 @@ for line in os.popen(re.sub('\$cmd', 'reg', args)):
running_total += value
diff = abs(running_total - total)
if (re.search(' -V ', args) or re.search(' -G ', args)) and diff < 0.015:
if re.search(' -[VGB] ', args) and diff < 0.015:
diff = 0.0
if diff > 0.001:
print "DISCREPANCY: %.3f (%.3f - %.3f) at line %d:" % \
@ -48,7 +48,7 @@ for line in os.popen(re.sub('\$cmd', 'bal', args)):
balance_total = clean(line[:20])
diff = abs(balance_total - running_total)
if (re.search(' -V ', args) or re.search(' -G ', args)) and diff < 0.015:
if re.search(' -[VGB] ', args) and diff < 0.015:
diff = 0.0
if diff > 0.001:
print

View file

@ -12,7 +12,7 @@ for test in \
"-G \$cmd c0226fafdf9e6711ac9121cf263e2d50791859cb"
do
echo testing: $test
python tools/confirm.py "ledger -f tools/standard.dat $test"
python tools/confirm.py "ledger -f tools/standard.dat --args-only --columns=80 $test"
errors=`expr $errors + $?`
done

View file

@ -4242,14 +4242,6 @@
c56a21d23a6535184e7152ee138c28974f14280c -936.961582 GGGGG @ $26.6700000000000000000693889390
c56a21d23a6535184e7152ee138c28974f14280c $0.01
2004/05/10 7f0496ac26aefd14a32168121600e823662d3592
c56a21d23a6535184e7152ee138c28974f14280c 2.552582 GGGGG
c56a21d23a6535184e7152ee138c28974f14280c 2.482278 AAAAA
c56a21d23a6535184e7152ee138c28974f14280c 0.000042 EEEEE
429c4d6b7270e9c309f132d9f80f09fd4e40b6df -2.552582 GGGGG
429c4d6b7270e9c309f132d9f80f09fd4e40b6df -2.482278 AAAAA
429c4d6b7270e9c309f132d9f80f09fd4e40b6df -0.000042 EEEEE
2004/05/11 * 106e6bd420d331275023c76038ebb520502b39ef
1b565047893eb8f55e839a9f0b5259d047547a82 $20.00
f0eb264dac24ed3a12eded5dfc3e3498e4ab13b9
@ -5009,10 +5001,6 @@
1b565047893eb8f55e839a9f0b5259d047547a82 $15.49
f0eb264dac24ed3a12eded5dfc3e3498e4ab13b9
2004/07/21 7f0496ac26aefd14a32168121600e823662d3592
c56a21d23a6535184e7152ee138c28974f14280c 17.358388 DDDDD
429c4d6b7270e9c309f132d9f80f09fd4e40b6df
2004/07/23 * bdc1fd5d3c0f3dcfd55d010426e61bf9451e680d
3282f21c97a0e1f66185923328d80d87fa5d8db7 $19.48
f0eb264dac24ed3a12eded5dfc3e3498e4ab13b9