From 459f587012121f8b81f06c9eb807337c5178009e Mon Sep 17 00:00:00 2001 From: thdox Date: Thu, 12 Feb 2015 23:46:37 +0100 Subject: Improve documentation about --rich-data. Conflicts: doc/ledger.1 --- test/baseline/opt-rich-data.test | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/baseline') diff --git a/test/baseline/opt-rich-data.test b/test/baseline/opt-rich-data.test index fbb73ebe..265af531 100644 --- a/test/baseline/opt-rich-data.test +++ b/test/baseline/opt-rich-data.test @@ -1,3 +1,13 @@ +test -f /dev/null convert test/baseline/feat-convert-with-directives.dat --now '2014/08/01' +2012/01/01 * KFC + Expenses:Unknown $10 + Equity:Unknown + +2012/01/02 * REWE SAGT DANKE 123454321 + Expenses:Unknown 10€ + Equity:Unknown +end test + test -f /dev/null convert test/baseline/feat-convert-with-directives.dat --detail --now '2014/08/01' 2012/01/01 * KFC ; CSV: 2012/01/01,KFC,$10 -- cgit v1.2.3 From 788ffc2a4bfdb95782163eeb463ff9c05947a311 Mon Sep 17 00:00:00 2001 From: thdox Date: Sun, 22 Feb 2015 16:51:57 +0100 Subject: Update test for --auto-match option. --- test/baseline/opt-auto-match.test | 47 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 3 deletions(-) (limited to 'test/baseline') diff --git a/test/baseline/opt-auto-match.test b/test/baseline/opt-auto-match.test index 7c3fb40a..54a1053b 100644 --- a/test/baseline/opt-auto-match.test +++ b/test/baseline/opt-auto-match.test @@ -14,17 +14,58 @@ Expenses:Food 20.00 EUR Liabilities:CC -20.00 EUR +test --input-date-format "%Y-%m-%d" convert test/baseline/opt-auto-match.dat +2012/03/01 * Food + Expenses:Unknown 10 + Equity:Unknown + +2012/03/02 * Phone + Expenses:Unknown 10 + Equity:Unknown + +2012/03/02 * Dining + Expenses:Unknown 10 + Equity:Unknown +end test + test --input-date-format "%Y-%m-%d" --auto-match convert test/baseline/opt-auto-match.dat 2012/03/01 * Food - Assets:Cash 10 + Expenses:Food 10 Equity:Unknown 2012/03/02 * Phone - Assets:Cash 10 + Expenses:Phone 10 Equity:Unknown 2012/03/02 * Dining - Liabilities:CC 10 + Expenses:Food 10 Equity:Unknown end test +test --input-date-format "%Y-%m-%d" --account Assets:Bank convert test/baseline/opt-auto-match.dat +2012/03/01 * Food + Expenses:Unknown 10 + Assets:Bank + +2012/03/02 * Phone + Expenses:Unknown 10 + Assets:Bank + +2012/03/02 * Dining + Expenses:Unknown 10 + Assets:Bank +end test + +test --input-date-format "%Y-%m-%d" --auto-match --account Assets:Bank convert test/baseline/opt-auto-match.dat +2012/03/01 * Food + Expenses:Food 10 + Assets:Bank + +2012/03/02 * Phone + Expenses:Phone 10 + Assets:Bank + +2012/03/02 * Dining + Expenses:Food 10 + Assets:Bank +end test -- cgit v1.2.3 From 73e3ecc6b865ecff63ccda307d4dbf70ec55a9c4 Mon Sep 17 00:00:00 2001 From: thdox Date: Mon, 23 Feb 2015 23:31:21 +0100 Subject: Fix alignment of cleared-format with 4 spaces as separator. --- doc/ledger3.texi | 4 ++-- src/report.h | 2 +- test/baseline/cmd-cleared.test | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'test/baseline') diff --git a/doc/ledger3.texi b/doc/ledger3.texi index 4a3d51e0..a2083e38 100644 --- a/doc/ledger3.texi +++ b/doc/ledger3.texi @@ -651,7 +651,7 @@ $ ledger -f drewr3.dat cleared $ -20.00 0 MasterCard $ 200.00 0 Mortgage:Principal $ -243.60 0 Tithe ----------------- ---------------- --------- +---------------- ---------------- --------- $ -243.60 0 @end smallexample @@ -7172,7 +7172,7 @@ Define the format for the cleared report. The default is: %-(ansify_if(partial_account(options.flat), blue if color))\n%/ %$1 %$2 %$3\n%/ %(prepend_width ? \" \" * int(prepend_width) : \"\") - ---------------- ---------------- ---------\n" + ---------------- ---------------- ---------\n" @end smallexample @item --register-format @var{FORMAT_STRING} diff --git a/src/report.h b/src/report.h index 67e95884..c54c8444 100644 --- a/src/report.h +++ b/src/report.h @@ -496,7 +496,7 @@ public: "%-(ansify_if(partial_account(options.flat), blue if color))\n%/" "%$1 %$2 %$3\n%/" "%(prepend_width ? \" \" * int(prepend_width) : \"\")" - "---------------- ---------------- ---------\n"); + "---------------- ---------------- ---------\n"); }); OPTION(report_t, color); diff --git a/test/baseline/cmd-cleared.test b/test/baseline/cmd-cleared.test index 501d207f..91219a40 100644 --- a/test/baseline/cmd-cleared.test +++ b/test/baseline/cmd-cleared.test @@ -30,7 +30,7 @@ test cleared -20 0 F -30 -30 12-Feb-26 G -40 0 H ----------------- ---------------- --------- +---------------- ---------------- --------- 0 0 end test -- cgit v1.2.3 From ddf17b62460f17e0cca3b01a40e838544d683f91 Mon Sep 17 00:00:00 2001 From: thdox Date: Tue, 24 Feb 2015 10:46:18 +0100 Subject: Add baseline test for --init-file option. --- test/CheckBaselineTests.py | 1 - test/baseline/opt-init-file.dat | 1 + test/baseline/opt-init-file.test | 10 ++++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 test/baseline/opt-init-file.dat create mode 100644 test/baseline/opt-init-file.test (limited to 'test/baseline') diff --git a/test/CheckBaselineTests.py b/test/CheckBaselineTests.py index 3c3e590b..dd6f4702 100755 --- a/test/CheckBaselineTests.py +++ b/test/CheckBaselineTests.py @@ -33,7 +33,6 @@ class CheckBaselineTests (CheckOptions): 'help-comm', 'help-disp', 'import', - 'init-file', 'no-color', 'options', 'price-db', diff --git a/test/baseline/opt-init-file.dat b/test/baseline/opt-init-file.dat new file mode 100644 index 00000000..92c5307a --- /dev/null +++ b/test/baseline/opt-init-file.dat @@ -0,0 +1 @@ +--decimal-comma diff --git a/test/baseline/opt-init-file.test b/test/baseline/opt-init-file.test new file mode 100644 index 00000000..128814e1 --- /dev/null +++ b/test/baseline/opt-init-file.test @@ -0,0 +1,10 @@ +2012-03-17 Quick + Expenses:Food 12,50 € + Assets:Cash + +test --init-file test/baseline/opt-init-file.dat bal + -12,50 € Assets:Cash + 12,50 € Expenses:Food +-------------------- + 0 +end test -- cgit v1.2.3 From e6a967b860d529137df11b2a79b2153c68e48b96 Mon Sep 17 00:00:00 2001 From: thdox Date: Tue, 24 Feb 2015 18:47:40 +0100 Subject: Add baseline test for --script option. --- test/CheckBaselineTests.py | 1 - test/baseline/opt-script.dat | 3 +++ test/baseline/opt-script.test | 15 +++++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 test/baseline/opt-script.dat create mode 100644 test/baseline/opt-script.test (limited to 'test/baseline') diff --git a/test/CheckBaselineTests.py b/test/CheckBaselineTests.py index 1bef0aa0..563f8aa5 100755 --- a/test/CheckBaselineTests.py +++ b/test/CheckBaselineTests.py @@ -34,7 +34,6 @@ class CheckBaselineTests (CheckOptions): 'price-db', 'price-exp', 'revalued-total', - 'script', 'seed', 'trace', 'verbose', diff --git a/test/baseline/opt-script.dat b/test/baseline/opt-script.dat new file mode 100644 index 00000000..ac6085d5 --- /dev/null +++ b/test/baseline/opt-script.dat @@ -0,0 +1,3 @@ +--no-pager --columns=80 bal +--no-pager --columns=80 reg +--no-pager --columns=80 print diff --git a/test/baseline/opt-script.test b/test/baseline/opt-script.test new file mode 100644 index 00000000..041c15ee --- /dev/null +++ b/test/baseline/opt-script.test @@ -0,0 +1,15 @@ +2012-03-17 KFC + Expenses:Food 20 CAD + Assets:Cash + +test --script test/baseline/opt-script.dat + -20 CAD Assets:Cash + 20 CAD Expenses:Food +-------------------- + 0 +12-Mar-17 KFC Expenses:Food 20 CAD 20 CAD + Assets:Cash -20 CAD 0 +2012/03/17 KFC + Expenses:Food 20 CAD + Assets:Cash +end test -- cgit v1.2.3 From df944929f82b473bbd155eac826420f0b38644eb Mon Sep 17 00:00:00 2001 From: thdox Date: Tue, 24 Feb 2015 10:42:37 +0100 Subject: Add baseline test for --price-db option. --- test/CheckBaselineTests.py | 1 - test/baseline/opt-price-db.dat | 2 ++ test/baseline/opt-price-db.test | 8 ++++++++ 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 test/baseline/opt-price-db.dat create mode 100644 test/baseline/opt-price-db.test (limited to 'test/baseline') diff --git a/test/CheckBaselineTests.py b/test/CheckBaselineTests.py index 563f8aa5..8c51ddef 100755 --- a/test/CheckBaselineTests.py +++ b/test/CheckBaselineTests.py @@ -31,7 +31,6 @@ class CheckBaselineTests (CheckOptions): 'no-color', 'no-pager' 'options', - 'price-db', 'price-exp', 'revalued-total', 'seed', diff --git a/test/baseline/opt-price-db.dat b/test/baseline/opt-price-db.dat new file mode 100644 index 00000000..abc51a0a --- /dev/null +++ b/test/baseline/opt-price-db.dat @@ -0,0 +1,2 @@ +P 2012-03-16 06:47:12 CAD $2.50 +P 2012-03-17 06:47:12 CAD $3.50 diff --git a/test/baseline/opt-price-db.test b/test/baseline/opt-price-db.test new file mode 100644 index 00000000..06021e4a --- /dev/null +++ b/test/baseline/opt-price-db.test @@ -0,0 +1,8 @@ +2012-03-17 KFC + Expenses:Food 20 CAD + Assets:Cash + +test pricedb --price-db test/baseline/opt-price-db.dat +P 2012/03/16 06:47:12 CAD $2.5 +P 2012/03/17 06:47:12 CAD $3.5 +end test -- cgit v1.2.3