test: examples for reproducing journal errors
This commit is contained in:
		
							parent
							
								
									e6bf04fce3
								
							
						
					
					
						commit
						6510ba3c95
					
				
							
								
								
									
										4
									
								
								hledger/test/errors/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								hledger/test/errors/README.md
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,4 @@ | ||||
| Journals for reproducing all of hledger's journal error messages. | ||||
| 
 | ||||
| Each has an easy command at the top for reproducing in the CLI. | ||||
| Some have additional declarations to help with reproducing in Emacs with flycheck-hledger. | ||||
							
								
								
									
										4
									
								
								hledger/test/errors/failing-balance-assertion.j
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								hledger/test/errors/failing-balance-assertion.j
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,4 @@ | ||||
| # hledger check | ||||
| 
 | ||||
| 1/1 | ||||
|   a  0 = 1 | ||||
							
								
								
									
										4
									
								
								hledger/test/errors/invalid-date.j
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								hledger/test/errors/invalid-date.j
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,4 @@ | ||||
| # hledger check | ||||
| 
 | ||||
| 2022/1/32 | ||||
|   (a:c)  1 | ||||
							
								
								
									
										3
									
								
								hledger/test/errors/invalid-regex.j
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								hledger/test/errors/invalid-regex.j
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,3 @@ | ||||
| # hledger check | ||||
| 
 | ||||
| alias /(/ = a | ||||
							
								
								
									
										12
									
								
								hledger/test/errors/nonunique-leaf-names.j
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								hledger/test/errors/nonunique-leaf-names.j
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,12 @@ | ||||
| # hledger check uniqueleafnames | ||||
| 
 | ||||
| account a:c  ; XXX check uniqueleafnames doesn't notice these | ||||
| account b:c  ; | ||||
| commodity 1. | ||||
| payee p | ||||
| 
 | ||||
| 1/1 p | ||||
|   (a:c)  1 | ||||
| 
 | ||||
| 1/1 p | ||||
|   (b:c)  1 | ||||
							
								
								
									
										3
									
								
								hledger/test/errors/parse-error.j
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								hledger/test/errors/parse-error.j
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,3 @@ | ||||
| # hledger check | ||||
| 
 | ||||
| 1 | ||||
							
								
								
									
										4
									
								
								hledger/test/errors/unbalanced-txn.j
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								hledger/test/errors/unbalanced-txn.j
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,4 @@ | ||||
| # hledger check | ||||
| 
 | ||||
| 1/1 | ||||
|   a  1 | ||||
							
								
								
									
										4
									
								
								hledger/test/errors/undeclared-acct.j
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								hledger/test/errors/undeclared-acct.j
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,4 @@ | ||||
| # hledger check accounts | ||||
| 
 | ||||
| 1/1 | ||||
|   (a)  1 | ||||
							
								
								
									
										6
									
								
								hledger/test/errors/undeclared-commodity.j
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								hledger/test/errors/undeclared-commodity.j
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,6 @@ | ||||
| # hledger check commodities | ||||
| 
 | ||||
| account a | ||||
| 
 | ||||
| 1/1 | ||||
|   (a)  A 1 | ||||
							
								
								
									
										7
									
								
								hledger/test/errors/undeclared-payee.j
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								hledger/test/errors/undeclared-payee.j
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,7 @@ | ||||
| # hledger check payees | ||||
| 
 | ||||
| account a | ||||
| commodity A | ||||
| 
 | ||||
| 1/1 p | ||||
|   (a)  A 1 | ||||
							
								
								
									
										11
									
								
								hledger/test/errors/unordered-dates.j
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								hledger/test/errors/unordered-dates.j
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,11 @@ | ||||
| # hledger check ordereddates | ||||
| 
 | ||||
| account a | ||||
| commodity 1. | ||||
| payee p | ||||
| 
 | ||||
| 1/2 p | ||||
|   (a)  1 | ||||
| 
 | ||||
| 1/1 p | ||||
|   (a)  1 | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user