update leap year tests
This commit is contained in:
parent
049ece6c72
commit
6e100703b9
@ -10,15 +10,17 @@ bin/hledger -f - print --effective
|
||||
b -1
|
||||
|
||||
>>>2
|
||||
# Effecitve date of 29 Feb on leap year should be valid
|
||||
>>>= 0
|
||||
# Effective date of 29 Feb on leap year should be valid
|
||||
bin/hledger -f - print --effective
|
||||
<<<
|
||||
2010/2/27=2010/2/29 x
|
||||
2001/2/27=2000/2/29 x
|
||||
a 1
|
||||
b
|
||||
>>>
|
||||
2010/02/29 x
|
||||
2000/02/29 x
|
||||
a 1
|
||||
b -1
|
||||
|
||||
>>>2
|
||||
>>>= 0
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
# dates with bad month or day numbers should be rejected
|
||||
# invalid dates should be rejected
|
||||
# 1. valid month and day, but flipped
|
||||
bin/hledger -f- print
|
||||
<<<
|
||||
2010/31/12 x
|
||||
@ -6,6 +7,7 @@ bin/hledger -f- print
|
||||
b
|
||||
>>>2 /bad month number: 31/
|
||||
>>>= 1
|
||||
# 2. too-large day
|
||||
bin/hledger -f- print
|
||||
<<<
|
||||
2010/12/32 x
|
||||
@ -13,21 +15,22 @@ bin/hledger -f- print
|
||||
b
|
||||
>>>2 /bad day number: 32/
|
||||
>>>= 1
|
||||
# 29th feb on leap year
|
||||
# 3. 29th feb on leap year should be ok
|
||||
bin/hledger -f- print
|
||||
<<<
|
||||
2010/2/29 x
|
||||
2000/2/29 x
|
||||
a 1
|
||||
b
|
||||
>>>
|
||||
2010/02/29 x
|
||||
2000/02/29 x
|
||||
a 1
|
||||
b -1
|
||||
|
||||
>>>= 0
|
||||
# 29th feb on non-leap yeap
|
||||
# 3. 29th feb on non-leap year should fail
|
||||
bin/hledger -f- print
|
||||
<<<
|
||||
2011/2/29 x
|
||||
2001/2/29 x
|
||||
a 1
|
||||
b
|
||||
>>>2 /bad day number: 29/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user