mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-29 05:11:33 +03:00
015b764d00
* Remember original postings during infer and pivot This includes such functions like: - inferFromAssignment - inferBalancingAmount - inferBalancingPrices - pivotPosting * Use original postings for hledger print - Introduce "--explicit" option for "print" command which brings back old behavior when every inferred number being printed. - Make "print" by default print original postings without inferred amounts. But use effective account name to have effect from aliases. - Instruct shell tests with an new expected output or to use --explicit option when inferred amounts are checked. Resolves simonmichael/hledger#442
45 lines
607 B
Plaintext
45 lines
607 B
Plaintext
# invalid dates should be rejected
|
|
# 1. valid month and day, but flipped
|
|
hledger -f- print
|
|
<<<
|
|
2010/31/12 x
|
|
a 1
|
|
b
|
|
>>>2 /bad date/
|
|
>>>= 1
|
|
# 2. too-large day
|
|
hledger -f- print
|
|
<<<
|
|
2010/12/32 x
|
|
a 1
|
|
b
|
|
>>>2 /bad date/
|
|
>>>= 1
|
|
# 3. 29th feb on leap year should be ok
|
|
hledger -f- print
|
|
<<<
|
|
2000/2/29 x
|
|
a 1
|
|
b
|
|
>>>
|
|
2000/02/29 x
|
|
a 1
|
|
b
|
|
|
|
>>>= 0
|
|
# 4. 29th feb on non-leap year should fail
|
|
hledger -f- print
|
|
<<<
|
|
2001/2/29 x
|
|
a 1
|
|
b
|
|
>>>2 /bad date/
|
|
>>>= 1
|
|
# 5. dates must be followed by whitespace or newline
|
|
hledger -f- print
|
|
<<<
|
|
2015/9/6*
|
|
a 0
|
|
>>>2 /unexpected '*'/
|
|
>>>= 1
|