;tests: convert default commodity tests to new format
[ci skip]
This commit is contained in:
parent
926b01f2eb
commit
242bf528fd
@ -4,78 +4,77 @@
|
||||
# display style for the commodity.
|
||||
|
||||
# 1. no default commodity
|
||||
hledger -f- print
|
||||
<<<
|
||||
<
|
||||
2010/1/1
|
||||
a 1000
|
||||
b
|
||||
>>>
|
||||
|
||||
$ hledger -f- print
|
||||
2010-01-01
|
||||
a 1000
|
||||
b
|
||||
|
||||
>>>=0
|
||||
>=0
|
||||
|
||||
# 2. pound, two decimal places, no digit group separator
|
||||
hledger -f- print
|
||||
<<<
|
||||
<
|
||||
D £1000.00
|
||||
2010/1/1
|
||||
a 1000
|
||||
b
|
||||
>>>
|
||||
|
||||
$ hledger -f- print
|
||||
2010-01-01
|
||||
a £1000.00
|
||||
b
|
||||
|
||||
>>>=0
|
||||
>=0
|
||||
|
||||
# 3. dollar, comma decimal point, three decimal places, no digit group separator
|
||||
hledger -f- print
|
||||
<<<
|
||||
<
|
||||
D $1,000
|
||||
2010/1/1
|
||||
a 1000
|
||||
b
|
||||
>>>
|
||||
|
||||
$ hledger -f- print
|
||||
2010-01-01
|
||||
a $1000,000
|
||||
b
|
||||
|
||||
>>>=0
|
||||
>=0
|
||||
|
||||
# 4. dollar, three digit group separator, one decimal place
|
||||
hledger -f- print
|
||||
<<<
|
||||
<
|
||||
D $1,000.0
|
||||
2010/1/1
|
||||
(a) 1000000
|
||||
>>>
|
||||
|
||||
$ hledger -f- print
|
||||
2010-01-01
|
||||
(a) $1,000,000.0
|
||||
|
||||
>>>=0
|
||||
>=0
|
||||
|
||||
# 5. commodity and display style applied to the second posting amount..
|
||||
# which ends up setting the digit group style, since it's the first amount
|
||||
# with digit groups. The great precision is used.
|
||||
hledger -f- print
|
||||
<<<
|
||||
<
|
||||
D $1,000.0
|
||||
2010/1/1
|
||||
(a) $1000000.00
|
||||
(b) 1000000
|
||||
>>>
|
||||
|
||||
$ hledger -f- print
|
||||
2010-01-01
|
||||
(a) $1,000,000.00
|
||||
(b) $1,000,000.00
|
||||
|
||||
>>>=0
|
||||
>=0
|
||||
|
||||
# 6. A default commodity should not affect parsing of
|
||||
# automated posting multiplier amounts.
|
||||
hledger -f- print --auto
|
||||
<<<
|
||||
<
|
||||
D $1000.
|
||||
|
||||
= a
|
||||
@ -84,10 +83,10 @@ D $1000.
|
||||
2018/1/1
|
||||
(a) €1
|
||||
|
||||
>>>
|
||||
$ hledger -f- print --auto
|
||||
2018-01-01 ; modified:
|
||||
(a) €1
|
||||
(b) €2 ; generated-posting: = a
|
||||
|
||||
>>>=
|
||||
>=0
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user