Test for auto-balancing of transactions with two commodities, when first amount is negative

This commit is contained in:
Dmitry Astapov 2011-04-24 22:10:30 +00:00
parent 50e2c07973
commit 6314080e14

View File

@ -146,3 +146,18 @@ bin/hledger -f - balance --cost
--------------------
0
>>>=0
# 11. When commodity price is specified implicitly, transaction should
# be considered balanced out even when first amount is negative
# (that is, price for it should be determined properly, with proper sign)
bin/hledger -f - balance
<<<
2011/01/01 x
a -10£
b 16$
>>>
-10£ a
16$ b
--------------------
16$
-10£
>>>=0