hledger/tests/misc/commodities.test
Simon Michael eb75946e64 print: always right-align amounts
print now always right-aligns the amounts in an entry, even when they
are wider than 12 characters.

If there is a price, it's considered part of the amount for
right-alignment. Maybe it would be nicer to put amounts and prices in
separate columns ? That will get a little complicated, needs more
discussion/design.

Also some cleanup of postingAsLines.
2015-10-10 15:09:42 -07:00

35 lines
621 B
Plaintext

# a commodity may contain/end with numbers, if double quoted
# 1. without quotes, fail. XXX parse error should be clearer here
hledger -f- print
<<<
2010-04-05 x
a 10 DE0002635307
b
>>>2 /unexpected/
>>>= 1
# 2. with quotes, ok; quotes appear in print output
hledger -f- print
<<<
2010-04-05 x
a 10 "DE 0002 635307"
b
>>>
2010/04/05 x
a 10 "DE 0002 635307"
b -10 "DE 0002 635307"
>>>=0
# 3. and in other reports too, I guess
hledger -f- balance
<<<
2010-04-05 x
a 10 "DE0002635307"
b
>>>
10 "DE0002635307" a
-10 "DE0002635307" b
--------------------
0
>>>=0