Using "hledgerdev" was a hack to help ensure that tests used a fresh developer build by default. Now they specify "hledger" again, which fits better with stack. It's up to the tester to make sure the desired executable is first in PATH or specified with -w. (Note a couple of tests currently don't obey -w and will always run "hledger", see addons.test).
		
			
				
	
	
		
			52 lines
		
	
	
		
			703 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			52 lines
		
	
	
		
			703 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            -1
 | |
| 
 | |
| >>>= 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 should be followed by whitespace or newline
 | |
| hledger -f- print
 | |
| <<<
 | |
| 2015/9/6:
 | |
|    a  0
 | |
| >>>2 /unexpected ":"/
 | |
| >>>= 1
 | |
| # 6.
 | |
| hledger -f- print
 | |
| <<<
 | |
| 2015/9/6=9/6* x
 | |
|    a  0
 | |
| >>>2 /unexpected "*"/
 | |
| >>>= 1
 |