test: equity/prices/rewrite now builtin
Fix shell-tests for add-ons that became built-in commands.
This commit is contained in:
		
							parent
							
								
									da1cf3b72d
								
							
						
					
					
						commit
						39d13d68ef
					
				| @ -1,7 +1,7 @@ | |||||||
| # Tests for equity addon | # Tests for equity addon | ||||||
| 
 | 
 | ||||||
| # Simple case | # Simple case | ||||||
| ../../bin/hledger-equity -f- -p 2016 assets liabilities | hledger equity -f- -p 2016 assets liabilities | ||||||
| <<< | <<< | ||||||
| 2016/1/1 open | 2016/1/1 open | ||||||
|     assets:bank         $100 |     assets:bank         $100 | ||||||
| @ -35,7 +35,7 @@ | |||||||
| >>>=0 | >>>=0 | ||||||
| 
 | 
 | ||||||
| # Test aggregation of postings with prices | # Test aggregation of postings with prices | ||||||
| ../../bin/hledger-equity -f- -p 2016 assets liabilities | hledger equity -f- -p 2016 assets liabilities | ||||||
| <<< | <<< | ||||||
| Y2016 | Y2016 | ||||||
| 01/31 | 01/31 | ||||||
| @ -71,7 +71,7 @@ Y2016 | |||||||
| >>>=0 | >>>=0 | ||||||
| 
 | 
 | ||||||
| # Verify effect of period | # Verify effect of period | ||||||
| ../../bin/hledger-equity -f- -p 2016 assets liabilities | hledger equity -f- -p 2016 assets liabilities | ||||||
| <<< | <<< | ||||||
| 2015/12/31 open | 2015/12/31 open | ||||||
|     assets:bank         $100 |     assets:bank         $100 | ||||||
| @ -1,7 +1,7 @@ | |||||||
| # Test prices addon | # Test prices addon | ||||||
| 
 | 
 | ||||||
| # by default only market prices are reported | # by default only market prices are reported | ||||||
| ../../bin/hledger-prices -f- | hledger prices -f- | ||||||
| <<< | <<< | ||||||
| P 2016/1/1 EUR $1.06 | P 2016/1/1 EUR $1.06 | ||||||
| P 2016/2/1 EUR $1.05 | P 2016/2/1 EUR $1.05 | ||||||
| @ -21,7 +21,7 @@ P 2016-02-01 EUR $1.05 | |||||||
| >>>=0 | >>>=0 | ||||||
| 
 | 
 | ||||||
| # costs from postings can be included also | # costs from postings can be included also | ||||||
| ../../bin/hledger-prices -f- --costs | hledger prices -f- --costs | ||||||
| <<< | <<< | ||||||
| P 2016/1/1 EUR $1.06 | P 2016/1/1 EUR $1.06 | ||||||
| P 2016/2/1 EUR $1.05 | P 2016/2/1 EUR $1.05 | ||||||
| @ -47,7 +47,7 @@ P 2016-02-01 EUR $1.05 | |||||||
| >>>=0 | >>>=0 | ||||||
| 
 | 
 | ||||||
| # inverted costs from postings can be calculated | # inverted costs from postings can be calculated | ||||||
| ../../bin/hledger-prices -f- --inverted-costs | hledger prices -f- --inverted-costs | ||||||
| <<< | <<< | ||||||
| P 2016/1/1 EUR $1.06 | P 2016/1/1 EUR $1.06 | ||||||
| P 2016/2/1 EUR $1.05 | P 2016/2/1 EUR $1.05 | ||||||
| @ -1,7 +1,7 @@ | |||||||
| # Tests for rewrite addon | # Tests for rewrite addon | ||||||
| 
 | 
 | ||||||
| # Add proportional income tax (from documentation) | # Add proportional income tax (from documentation) | ||||||
| ../../bin/hledger-rewrite -f- ^income --add-posting '(liabilities:tax)  *.33  ; income tax' | hledger rewrite -f- ^income --add-posting '(liabilities:tax)  *.33  ; income tax' | ||||||
| <<< | <<< | ||||||
| 2016/1/1 paycheck | 2016/1/1 paycheck | ||||||
|     income:remuneration     $-100 |     income:remuneration     $-100 | ||||||
| @ -27,7 +27,7 @@ | |||||||
| >>>=0 | >>>=0 | ||||||
| 
 | 
 | ||||||
| # Duplicate posting for budgeting (from documentation) | # Duplicate posting for budgeting (from documentation) | ||||||
| ../../bin/hledger-rewrite -f- expenses:gifts --add-posting '(budget:gifts)  *-1' | hledger rewrite -f- expenses:gifts --add-posting '(budget:gifts)  *-1' | ||||||
| <<< | <<< | ||||||
| 2016/1/1 withdraw | 2016/1/1 withdraw | ||||||
|     assets:cash     $20 |     assets:cash     $20 | ||||||
| @ -50,7 +50,7 @@ | |||||||
| >>>=0 | >>>=0 | ||||||
| 
 | 
 | ||||||
| # Add postings in another commodity | # Add postings in another commodity | ||||||
| ../../bin/hledger-rewrite -f- | hledger rewrite -f- | ||||||
| <<< | <<< | ||||||
| 2017/04/24 * 09:00-09:25 | 2017/04/24 * 09:00-09:25 | ||||||
|     (assets:unbilled:client1)           0.42h |     (assets:unbilled:client1)           0.42h | ||||||
| @ -85,7 +85,7 @@ | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| # Add postings with prices | # Add postings with prices | ||||||
| ../../bin/hledger-rewrite -f- -B | hledger rewrite -f- -B | ||||||
| <<< | <<< | ||||||
| 2017/04/24 * 09:00-09:25 | 2017/04/24 * 09:00-09:25 | ||||||
|     (assets:unbilled:client1)         0.42h |     (assets:unbilled:client1)         0.42h | ||||||
| @ -124,7 +124,7 @@ | |||||||
| >>>=0 | >>>=0 | ||||||
| 
 | 
 | ||||||
| # Add absolute bank processing fee | # Add absolute bank processing fee | ||||||
| ../../bin/hledger-rewrite -f- assets:bank and 'amt:<0' --add-posting 'expenses:fee  $5'  --add-posting 'assets:bank  $-5' | hledger rewrite -f- assets:bank and 'amt:<0' --add-posting 'expenses:fee  $5'  --add-posting 'assets:bank  $-5' | ||||||
| <<< | <<< | ||||||
| 2016/1/1 withdraw | 2016/1/1 withdraw | ||||||
|     assets:cash     $20 |     assets:cash     $20 | ||||||
| @ -155,7 +155,7 @@ | |||||||
| >>>=0 | >>>=0 | ||||||
| 
 | 
 | ||||||
| # Rewrite rule within journal | # Rewrite rule within journal | ||||||
| ../../bin/hledger-rewrite -f- date:2017/1  --add-posting 'Here comes Santa  $0' | hledger rewrite -f- date:2017/1  --add-posting 'Here comes Santa  $0' | ||||||
| <<< | <<< | ||||||
| = ^assets:bank$ date:2017/1 amt:<0 | = ^assets:bank$ date:2017/1 amt:<0 | ||||||
|     assets:bank  *0.008 |     assets:bank  *0.008 | ||||||
| @ -222,7 +222,7 @@ | |||||||
| >>>=0 | >>>=0 | ||||||
| 
 | 
 | ||||||
| # Rewrite using diff output | # Rewrite using diff output | ||||||
| ../../bin/hledger-rewrite --diff -f- assets:bank and 'amt:<0' --add-posting 'expenses:fee  $5'  --add-posting 'assets:bank  $-5' | hledger rewrite --diff -f- assets:bank and 'amt:<0' --add-posting 'expenses:fee  $5'  --add-posting 'assets:bank  $-5' | ||||||
| <<< | <<< | ||||||
| 2016/01/01 withdraw | 2016/01/01 withdraw | ||||||
|     assets:cash              $20 |     assets:cash              $20 | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user