mirror of
https://github.com/simonmichael/hledger.git
synced 2024-11-15 17:48:59 +03:00
5c09553481
Related to #563, when rendering a transaction, we reserve two more chars of width so that amounts remain aligned when there are posting flags. Affects hledger-ui's transaction screen, print, hledger-rewrite etc.
115 lines
1.6 KiB
Plaintext
115 lines
1.6 KiB
Plaintext
# Tests of --explicit option effect
|
|
|
|
# 1. implicit transaction balance w/o --explict
|
|
hledger -f - print
|
|
<<<
|
|
2017/1/1
|
|
expenses $5
|
|
assets
|
|
>>>
|
|
2017/01/01
|
|
expenses $5
|
|
assets
|
|
|
|
>>>2
|
|
>>>=0
|
|
|
|
# 2. implicit transaction balance w/ --explict
|
|
hledger -f - print --explicit
|
|
<<<
|
|
2017/1/1
|
|
expenses $5
|
|
assets
|
|
>>>
|
|
2017/01/01
|
|
expenses $5
|
|
assets $-5
|
|
|
|
>>>2
|
|
>>>=0
|
|
|
|
# 3. implicit commodity price w/o --explict
|
|
hledger -f - print
|
|
<<<
|
|
2017/1/1
|
|
expenses 4 EUR
|
|
assets $-5
|
|
>>>
|
|
2017/01/01
|
|
expenses 4 EUR
|
|
assets $-5
|
|
|
|
>>>2
|
|
>>>=0
|
|
|
|
# 4. implicit commodity price w/ --explict
|
|
hledger -f - print --explicit
|
|
<<<
|
|
2017/1/1
|
|
expenses 4 EUR
|
|
assets $-5
|
|
>>>
|
|
2017/01/01
|
|
expenses 4 EUR @@ $5
|
|
assets $-5
|
|
|
|
>>>2
|
|
>>>=0
|
|
|
|
# 5. implicit account balance w/o --explict
|
|
hledger -f - print
|
|
<<<
|
|
2017/1/1
|
|
assets = $100
|
|
equity
|
|
>>>
|
|
2017/01/01
|
|
assets = $100
|
|
equity
|
|
|
|
>>>2
|
|
>>>=0
|
|
|
|
# 6. implicit account balance w/ --explict
|
|
hledger -f - print --explicit
|
|
<<<
|
|
2017/1/1
|
|
assets = $100
|
|
equity
|
|
>>>
|
|
2017/01/01
|
|
assets $100 = $100
|
|
equity $-100
|
|
|
|
>>>2
|
|
>>>=0
|
|
|
|
# 7. default commodity always applied because print do not issue appropriate directive
|
|
hledger -f - print
|
|
<<<
|
|
D 1000.00 EUR
|
|
2017/1/1
|
|
expenses 100
|
|
assets
|
|
>>>
|
|
2017/01/01
|
|
expenses 100.00 EUR
|
|
assets
|
|
|
|
>>>2
|
|
>>>=0
|
|
|
|
# 8. option --explicit implies effect of --empty
|
|
hledger -f - print --explicit
|
|
<<<
|
|
2017/1/1
|
|
assets $0
|
|
equity
|
|
>>>
|
|
2017/01/01
|
|
assets 0
|
|
equity 0
|
|
|
|
>>>2
|
|
>>>=0
|