From 39d13d68ef11daa49e0bfcc8c0b138c05a72e3cc Mon Sep 17 00:00:00 2001 From: Mykola Orliuk Date: Sat, 28 Oct 2017 14:41:53 +0200 Subject: [PATCH] test: equity/prices/rewrite now builtin Fix shell-tests for add-ons that became built-in commands. --- tests/{bin => misc}/equity.test | 6 +++--- tests/{bin => misc}/prices.test | 6 +++--- tests/{bin => misc}/rewrite.test | 14 +++++++------- 3 files changed, 13 insertions(+), 13 deletions(-) rename tests/{bin => misc}/equity.test (94%) rename tests/{bin => misc}/prices.test (91%) rename tests/{bin => misc}/rewrite.test (90%) diff --git a/tests/bin/equity.test b/tests/misc/equity.test similarity index 94% rename from tests/bin/equity.test rename to tests/misc/equity.test index e043a8de2..5164adf41 100644 --- a/tests/bin/equity.test +++ b/tests/misc/equity.test @@ -1,7 +1,7 @@ # Tests for equity addon # Simple case -../../bin/hledger-equity -f- -p 2016 assets liabilities +hledger equity -f- -p 2016 assets liabilities <<< 2016/1/1 open assets:bank $100 @@ -35,7 +35,7 @@ >>>=0 # Test aggregation of postings with prices -../../bin/hledger-equity -f- -p 2016 assets liabilities +hledger equity -f- -p 2016 assets liabilities <<< Y2016 01/31 @@ -71,7 +71,7 @@ Y2016 >>>=0 # Verify effect of period -../../bin/hledger-equity -f- -p 2016 assets liabilities +hledger equity -f- -p 2016 assets liabilities <<< 2015/12/31 open assets:bank $100 diff --git a/tests/bin/prices.test b/tests/misc/prices.test similarity index 91% rename from tests/bin/prices.test rename to tests/misc/prices.test index 54198803f..32e8b6295 100644 --- a/tests/bin/prices.test +++ b/tests/misc/prices.test @@ -1,7 +1,7 @@ # Test prices addon # by default only market prices are reported -../../bin/hledger-prices -f- +hledger prices -f- <<< P 2016/1/1 EUR $1.06 P 2016/2/1 EUR $1.05 @@ -21,7 +21,7 @@ P 2016-02-01 EUR $1.05 >>>=0 # 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/2/1 EUR $1.05 @@ -47,7 +47,7 @@ P 2016-02-01 EUR $1.05 >>>=0 # 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/2/1 EUR $1.05 diff --git a/tests/bin/rewrite.test b/tests/misc/rewrite.test similarity index 90% rename from tests/bin/rewrite.test rename to tests/misc/rewrite.test index 3cd022667..0b14f34fd 100644 --- a/tests/bin/rewrite.test +++ b/tests/misc/rewrite.test @@ -1,7 +1,7 @@ # Tests for rewrite addon # 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 income:remuneration $-100 @@ -27,7 +27,7 @@ >>>=0 # 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 assets:cash $20 @@ -50,7 +50,7 @@ >>>=0 # Add postings in another commodity -../../bin/hledger-rewrite -f- +hledger rewrite -f- <<< 2017/04/24 * 09:00-09:25 (assets:unbilled:client1) 0.42h @@ -85,7 +85,7 @@ # Add postings with prices -../../bin/hledger-rewrite -f- -B +hledger rewrite -f- -B <<< 2017/04/24 * 09:00-09:25 (assets:unbilled:client1) 0.42h @@ -124,7 +124,7 @@ >>>=0 # 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 assets:cash $20 @@ -155,7 +155,7 @@ >>>=0 # 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 *0.008 @@ -222,7 +222,7 @@ >>>=0 # 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 assets:cash $20