hledger/tests/pricing.tests
2010-05-22 00:52:45 +00:00

52 lines
1.1 KiB
Plaintext

# draft pricing tests
# 1. print a transaction with explicitly-priced amount
bin/hledger -f- print
<<<
2009/1/2 x
expenses:foreign currency €100 @ $1.35
assets
>>>
2009/01/02 x
expenses:foreign currency €100 @ $1.35
assets $-135.00
# 2. again, this time converting to cost basis
bin/hledger -f- print -B
<<<
2009/1/2 x
expenses:foreign currency €100 @ $1.35
assets
>>>
2009/01/02 x
expenses:foreign currency $135.00
assets $-135.00
# 3. same as above, but using a historical price directive
bin/hledger -f- print
<<<
P 2009/1/1 € $1.35
2009/1/2 x
expenses:foreign currency €100
assets
>>>
2009/01/02 x
expenses:foreign currency €100 @ $1.35
assets €-100 @ $1.35
# 4. and with conversion
bin/hledger -f- print -B
<<<
P 2009/1/1 € $1.35
2009/1/2 x
expenses:foreign currency €100
assets
>>>
2009/01/02 x
expenses:foreign currency $135.00
assets $-135.00