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).
		
			
				
	
	
		
			62 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			62 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| # a timelog session is parsed as a similarly-named transaction with one virtual posting
 | |
| hledger -f - print
 | |
| <<<
 | |
| i 2009/1/1 08:00:00
 | |
| o 2009/1/1 09:00:00 stuff on checkout record  is ignored
 | |
| 
 | |
| i 2009/1/2 08:00:00 account name
 | |
| o 2009/1/2 09:00:00
 | |
| i 2009/1/3 08:00:00 some:account name  and a description
 | |
| o 2009/1/3 09:00:00
 | |
| >>>
 | |
| 2009/01/01 * 08:00-09:00
 | |
|     ()         1.00h
 | |
| 
 | |
| 2009/01/02 * 08:00-09:00
 | |
|     (account name)         1.00h
 | |
| 
 | |
| 2009/01/03 * and a description
 | |
|     (some:account name)         1.00h
 | |
| 
 | |
| >>>2
 | |
| >>>= 0
 | |
| 
 | |
| # ledger timelog example from #ledger
 | |
| # ==== consulting.timelog
 | |
| # ; Timelog for consulting sideline
 | |
| # ; All times UTC
 | |
| # i 2011/01/26 16:00:00 XXXX:Remote "IPMI Access" 
 | |
| # o 2011/01/26 16:15:00
 | |
| 
 | |
| # i 2011/01/26 17:45:00 XXXX:Onsite "Fix opty server" 
 | |
| # o 2011/01/26 20:00:00
 | |
| 
 | |
| # i 2011/01/27 18:00:00 XXXX:Remote "SSL certificate for www.YYYY.com"
 | |
| # o 2011/01/27 18:15:00
 | |
| 
 | |
| # ; vim:ts=2 sw=2 sts=2 et ft=ledger fdm=manual:
 | |
| # ==== consulting.dat
 | |
| # ; Ledger for Consulting sideline
 | |
| 
 | |
| # !account Consulting
 | |
| # !include consulting.timelog
 | |
| # !end
 | |
| 
 | |
| 
 | |
| # 2010/02/27 (INV#2) XXXX Test Invoice
 | |
| #   Consulting:XXXX:Remote                -0.5h @ $75.00
 | |
| #   Consulting:XXXX:Onsite                -2.25h @ $100.00
 | |
| #   Receivable:Consulting:XXXX
 | |
| 
 | |
| 
 | |
| # ; vim:ts=2 sw=2 sts=2 et ft=ledger fdm=manual:
 | |
| # ==== command: ledger -f consulting.dat -s bal
 | |
| #               -2.25h  Consulting:XXXX:Onsite
 | |
| #                2.25h  Consulting:XXXX:Onsite "Fix opty server" 
 | |
| #               -30.0m  Consulting:XXXX:Remote
 | |
| #                15.0m  Consulting:XXXX:Remote "IPMI Access" 
 | |
| #                15.0m  Consulting:XXXX:Remote "SSL certificate for www.YYYY.com"
 | |
| #               $262.5  Receivable:Consulting:XXXX
 | |
| # --------------------
 | |
| #               $262.5  
 |