hledger/tests/journal/status.test
Simon Michael 5c09553481 lib: keep amounts aligned when rendering a transaction with posting flags
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.
2017-06-04 21:26:18 -07:00

81 lines
922 B
Plaintext

# 1. the status field can contain nothing,
hledger -f- print
<<<
2015/1/1 x
(a) 1
>>>
2015/01/01 x
(a) 1
>>>=0
# 2. or !
hledger -f- print
<<<
2015/1/1 ! x
(a) 1
>>>
2015/01/01 ! x
(a) 1
>>>=0
# 3. or *
hledger -f- print
<<<
2015/1/1 * x
(a) 1
>>>
2015/01/01 * x
(a) 1
>>>=0
# 4. --cleared matches * only
hledger -f- print --cleared
<<<
2015/1/1 x
(a) 1
2015/1/1 ! x
(b) 1
2015/1/1 * x
(c) 1
>>>
2015/01/01 * x
(c) 1
>>>=0
# 5. --pending matches ! only
hledger -f- print --pending
<<<
2015/1/1 x
(a) 1
2015/1/1 ! x
(b) 1
2015/1/1 * x
(c) 1
>>>
2015/01/01 ! x
(b) 1
>>>=0
# 6. --uncleared matches all except *
hledger -f- print --uncleared
<<<
2015/1/1 x
(a) 1
2015/1/1 ! x
(b) 1
2015/1/1 * x
(c) 1
>>>
2015/01/01 x
(a) 1
2015/01/01 ! x
(b) 1
>>>=0