summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMartin Michlmayr <tbm@cyrius.com>2012-03-25 17:39:49 +0100
committerMartin Michlmayr <tbm@cyrius.com>2012-03-25 17:39:49 +0100
commit4d0daf77d7aef535bc206154344a1061b6064ec6 (patch)
tree558f003c46d112b01030e3ec2bd7a0e3760f6f67 /test
parentf4e6d30736a41008da0193e58fbe89f15fdbb3b0 (diff)
downloadfork-ledger-4d0daf77d7aef535bc206154344a1061b6064ec6.tar.gz
fork-ledger-4d0daf77d7aef535bc206154344a1061b6064ec6.tar.bz2
fork-ledger-4d0daf77d7aef535bc206154344a1061b6064ec6.zip
Add more baseline tests
Diffstat (limited to 'test')
-rw-r--r--test/baseline/cmd-source.test46
-rw-r--r--test/baseline/opt-auto-match.dat4
-rw-r--r--test/baseline/opt-auto-match.test30
-rw-r--r--test/baseline/opt-bold-if.test16
-rw-r--r--test/baseline/opt-budget-format.test21
-rw-r--r--test/baseline/opt-count.test43
-rw-r--r--test/baseline/opt-decimal-comma.test22
-rw-r--r--test/baseline/opt-forecast-years.test202
-rw-r--r--test/baseline/opt-group-by.test114
-rw-r--r--test/baseline/opt-group-title-format.test48
-rw-r--r--test/baseline/opt-inject.test10
-rw-r--r--test/baseline/opt-lot-notes.test31
12 files changed, 583 insertions, 4 deletions
diff --git a/test/baseline/cmd-source.test b/test/baseline/cmd-source.test
index e78ae6fd..95a10924 100644
--- a/test/baseline/cmd-source.test
+++ b/test/baseline/cmd-source.test
@@ -1,3 +1,5 @@
+~ xxx
+
2012-02-28 * Test
E 30.00 EUR
F
@@ -12,15 +14,51 @@
E 30.00 EUR
F
-test source -> 3
+2012-03-25 * Test
+ G AAA
+ H
+
+2012-03-26 * Test
+ I 1,00.00 EUR
+ J -100.00 EUR
+
+2012-03-27 * Test
+ K 100.00 EUR
+ L -200.00 EUR
+
+test source -> 7
__ERROR__
-While parsing file "$FILE", line 4:
-Error: Only one posting with null amount allowed per transaction
-While parsing file "$FILE", line 9:
+While parsing file "$FILE", line 1:
+While parsing periodic transaction:
+> ~ xxx
+Error: Unexpected date period token 'xxx'
+While parsing file "$FILE", line 6:
Error: Only one posting with null amount allowed per transaction
While parsing file "$FILE", line 11:
+Error: Only one posting with null amount allowed per transaction
+While parsing file "$FILE", line 13:
While parsing transaction:
> 2012/03/xx
Error: Invalid date: 2012/03/xx
+While parsing file "$FILE", line 18:
+While parsing posting:
+ G AAA
+ ^^^
+Error: No quantity specified for amount
+While parsing file "$FILE", line 22:
+While parsing posting:
+ I 1,00.00 EUR
+ ^^^^^^^^^^^
+Error: Incorrect use of thousand-mark comma
+While parsing file "$FILE", line 27:
+While balancing transaction from "$FILE", lines 25-27:
+> 2012-03-27 * Test
+> K 100.00 EUR
+> L -200.00 EUR
+Unbalanced remainder is:
+ -100.00 EUR
+Amount to balance against:
+ 100.00 EUR
+Error: Transaction does not balance
end test
diff --git a/test/baseline/opt-auto-match.dat b/test/baseline/opt-auto-match.dat
new file mode 100644
index 00000000..bfbf71eb
--- /dev/null
+++ b/test/baseline/opt-auto-match.dat
@@ -0,0 +1,4 @@
+date,amount,desc,
+2012/03/01,10,Food,
+2012/03/02,10,Phone,
+2012/03/02,10,Dining,
diff --git a/test/baseline/opt-auto-match.test b/test/baseline/opt-auto-match.test
index e69de29b..7c3fb40a 100644
--- a/test/baseline/opt-auto-match.test
+++ b/test/baseline/opt-auto-match.test
@@ -0,0 +1,30 @@
+2012-01-01 * Opening balance
+ Assets:Cash 100.00 EUR
+ Equity:Opening Balance
+
+2012-01-02 * Food
+ Expenses:Food 25.00 EUR
+ Assets:Cash -25.00 EUR
+
+2012-01-03 * Phone
+ Expenses:Phone 10.00 EUR
+ Assets:Cash -10.00 EUR
+
+2012-01-04 * Dining
+ Expenses:Food 20.00 EUR
+ Liabilities:CC -20.00 EUR
+
+test --input-date-format "%Y-%m-%d" --auto-match convert test/baseline/opt-auto-match.dat
+2012/03/01 * Food
+ Assets:Cash 10
+ Equity:Unknown
+
+2012/03/02 * Phone
+ Assets:Cash 10
+ Equity:Unknown
+
+2012/03/02 * Dining
+ Liabilities:CC 10
+ Equity:Unknown
+end test
+
diff --git a/test/baseline/opt-bold-if.test b/test/baseline/opt-bold-if.test
index e69de29b..1f6f4c21 100644
--- a/test/baseline/opt-bold-if.test
+++ b/test/baseline/opt-bold-if.test
@@ -0,0 +1,16 @@
+2012-01-01 * Opening balance
+ Assets:Cash 100.00 EUR
+ Equity:Opening Balance
+
+2012-01-02 * Test
+ ; :test:
+ Expenses:Food 100.00 EUR
+ Assets:Cash -100.00 EUR
+
+test reg --bold-if 'has_tag("test")'
+12-Jan-01 Opening balance Assets:Cash 100.00 EUR 100.00 EUR
+ Equity:Opening Balance -100.00 EUR 0
+12-Jan-02 Test  Expenses:Food   100.00 EUR  100.00 EUR
+   Assets:Cash   -100.00 EUR  0
+end test
+
diff --git a/test/baseline/opt-budget-format.test b/test/baseline/opt-budget-format.test
index e69de29b..d2b84f98 100644
--- a/test/baseline/opt-budget-format.test
+++ b/test/baseline/opt-budget-format.test
@@ -0,0 +1,21 @@
+~ Monthly
+ Expenses:Phone 10.00 GBP
+ Expenses:Rent 550.00 GBP
+ Assets
+
+2012-02-28 * Phone expense
+ Expenses:Phone 20.00 GBP
+ Assets:Cash -20.00 GBP
+
+2012-02-29 * Rent expense
+ Expenses:Rent 530.00 GBP
+ Assets:Cash -530.00 GBP
+
+test budget --now 2012-02-29 --budget-format "%(justify(scrub(display_total), 0))\n"
+(-550.00 GBP, 560.00 GBP)
+(550.00 GBP, -560.00 GBP)
+(20.00 GBP, -10.00 GBP)
+(530.00 GBP, -550.00 GBP)
+(0, 0)
+end test
+
diff --git a/test/baseline/opt-count.test b/test/baseline/opt-count.test
index e69de29b..9c5495c8 100644
--- a/test/baseline/opt-count.test
+++ b/test/baseline/opt-count.test
@@ -0,0 +1,43 @@
+2012-02-28 Phone expense
+ Expenses:Phone 20.00 GBP
+ Assets:Cash -20.00 GBP
+
+2012-02-29 * Rent expense
+ Expenses:Rent 530.00 GBP
+ Assets:Cash -530.00 GBP
+
+2012-03-03 Phone expense
+ Expenses:Phone 12.00 EUR
+ Assets:Cash -12.00 EUR
+
+2012-03-04 * Bed and breakfast
+ ; Payee: Rent expense
+ ; :bnb:
+ Expenses:Rent 30.00 EUR
+ Assets:Cash -30.00 EUR
+
+test accounts --count
+2 Expenses:Phone
+4 Assets:Cash
+2 Expenses:Rent
+end test
+
+test commodities --count
+4 GBP
+4 EUR
+end test
+
+test payees --count
+4 Phone expense
+4 Rent expense
+end test
+
+test commodities :rent --count
+1 GBP
+1 EUR
+end test
+
+test payees tag bnb --count
+2 Rent expense
+end test
+
diff --git a/test/baseline/opt-decimal-comma.test b/test/baseline/opt-decimal-comma.test
index e69de29b..e056c914 100644
--- a/test/baseline/opt-decimal-comma.test
+++ b/test/baseline/opt-decimal-comma.test
@@ -0,0 +1,22 @@
+2012-01-01 * Opening balance
+ Assets:Cash 100,00 EUR
+ Equity:Opening Balance
+
+2012-01-02 * Test
+ Expenses:Food 10,00 EUR
+ Assets:Cash -10,00 EUR
+
+2012-01-03 * Test
+ Expenses:Food €10,00
+ Assets:Cash €-10,00
+
+test --decimal-comma bal
+ 90,00 EUR
+ €-10,00 Assets:Cash
+ -100,00 EUR Equity:Opening Balance
+ 10,00 EUR
+ €10,00 Expenses:Food
+--------------------
+ 0
+end test
+
diff --git a/test/baseline/opt-forecast-years.test b/test/baseline/opt-forecast-years.test
index e69de29b..6b1053f5 100644
--- a/test/baseline/opt-forecast-years.test
+++ b/test/baseline/opt-forecast-years.test
@@ -0,0 +1,202 @@
+~ Monthly
+ Expenses:Rent 500.00 GBP
+ Assets
+
+test --now 2012-01-01 --forecast "T<200000.00 GBP" reg :rent
+12-Feb-01 Forecast transaction Expenses:Rent 500.00 GBP 500.00 GBP
+12-Mar-01 Forecast transaction Expenses:Rent 500.00 GBP 1000.00 GBP
+12-Apr-01 Forecast transaction Expenses:Rent 500.00 GBP 1500.00 GBP
+12-May-01 Forecast transaction Expenses:Rent 500.00 GBP 2000.00 GBP
+12-Jun-01 Forecast transaction Expenses:Rent 500.00 GBP 2500.00 GBP
+12-Jul-01 Forecast transaction Expenses:Rent 500.00 GBP 3000.00 GBP
+12-Aug-01 Forecast transaction Expenses:Rent 500.00 GBP 3500.00 GBP
+12-Sep-01 Forecast transaction Expenses:Rent 500.00 GBP 4000.00 GBP
+12-Oct-01 Forecast transaction Expenses:Rent 500.00 GBP 4500.00 GBP
+12-Nov-01 Forecast transaction Expenses:Rent 500.00 GBP 5000.00 GBP
+12-Dec-01 Forecast transaction Expenses:Rent 500.00 GBP 5500.00 GBP
+13-Jan-01 Forecast transaction Expenses:Rent 500.00 GBP 6000.00 GBP
+13-Feb-01 Forecast transaction Expenses:Rent 500.00 GBP 6500.00 GBP
+13-Mar-01 Forecast transaction Expenses:Rent 500.00 GBP 7000.00 GBP
+13-Apr-01 Forecast transaction Expenses:Rent 500.00 GBP 7500.00 GBP
+13-May-01 Forecast transaction Expenses:Rent 500.00 GBP 8000.00 GBP
+13-Jun-01 Forecast transaction Expenses:Rent 500.00 GBP 8500.00 GBP
+13-Jul-01 Forecast transaction Expenses:Rent 500.00 GBP 9000.00 GBP
+13-Aug-01 Forecast transaction Expenses:Rent 500.00 GBP 9500.00 GBP
+13-Sep-01 Forecast transaction Expenses:Rent 500.00 GBP 10000.00 GBP
+13-Oct-01 Forecast transaction Expenses:Rent 500.00 GBP 10500.00 GBP
+13-Nov-01 Forecast transaction Expenses:Rent 500.00 GBP 11000.00 GBP
+13-Dec-01 Forecast transaction Expenses:Rent 500.00 GBP 11500.00 GBP
+14-Jan-01 Forecast transaction Expenses:Rent 500.00 GBP 12000.00 GBP
+14-Feb-01 Forecast transaction Expenses:Rent 500.00 GBP 12500.00 GBP
+14-Mar-01 Forecast transaction Expenses:Rent 500.00 GBP 13000.00 GBP
+14-Apr-01 Forecast transaction Expenses:Rent 500.00 GBP 13500.00 GBP
+14-May-01 Forecast transaction Expenses:Rent 500.00 GBP 14000.00 GBP
+14-Jun-01 Forecast transaction Expenses:Rent 500.00 GBP 14500.00 GBP
+14-Jul-01 Forecast transaction Expenses:Rent 500.00 GBP 15000.00 GBP
+14-Aug-01 Forecast transaction Expenses:Rent 500.00 GBP 15500.00 GBP
+14-Sep-01 Forecast transaction Expenses:Rent 500.00 GBP 16000.00 GBP
+14-Oct-01 Forecast transaction Expenses:Rent 500.00 GBP 16500.00 GBP
+14-Nov-01 Forecast transaction Expenses:Rent 500.00 GBP 17000.00 GBP
+14-Dec-01 Forecast transaction Expenses:Rent 500.00 GBP 17500.00 GBP
+15-Jan-01 Forecast transaction Expenses:Rent 500.00 GBP 18000.00 GBP
+15-Feb-01 Forecast transaction Expenses:Rent 500.00 GBP 18500.00 GBP
+15-Mar-01 Forecast transaction Expenses:Rent 500.00 GBP 19000.00 GBP
+15-Apr-01 Forecast transaction Expenses:Rent 500.00 GBP 19500.00 GBP
+15-May-01 Forecast transaction Expenses:Rent 500.00 GBP 20000.00 GBP
+15-Jun-01 Forecast transaction Expenses:Rent 500.00 GBP 20500.00 GBP
+15-Jul-01 Forecast transaction Expenses:Rent 500.00 GBP 21000.00 GBP
+15-Aug-01 Forecast transaction Expenses:Rent 500.00 GBP 21500.00 GBP
+15-Sep-01 Forecast transaction Expenses:Rent 500.00 GBP 22000.00 GBP
+15-Oct-01 Forecast transaction Expenses:Rent 500.00 GBP 22500.00 GBP
+15-Nov-01 Forecast transaction Expenses:Rent 500.00 GBP 23000.00 GBP
+15-Dec-01 Forecast transaction Expenses:Rent 500.00 GBP 23500.00 GBP
+16-Jan-01 Forecast transaction Expenses:Rent 500.00 GBP 24000.00 GBP
+16-Feb-01 Forecast transaction Expenses:Rent 500.00 GBP 24500.00 GBP
+16-Mar-01 Forecast transaction Expenses:Rent 500.00 GBP 25000.00 GBP
+16-Apr-01 Forecast transaction Expenses:Rent 500.00 GBP 25500.00 GBP
+16-May-01 Forecast transaction Expenses:Rent 500.00 GBP 26000.00 GBP
+16-Jun-01 Forecast transaction Expenses:Rent 500.00 GBP 26500.00 GBP
+16-Jul-01 Forecast transaction Expenses:Rent 500.00 GBP 27000.00 GBP
+16-Aug-01 Forecast transaction Expenses:Rent 500.00 GBP 27500.00 GBP
+16-Sep-01 Forecast transaction Expenses:Rent 500.00 GBP 28000.00 GBP
+16-Oct-01 Forecast transaction Expenses:Rent 500.00 GBP 28500.00 GBP
+16-Nov-01 Forecast transaction Expenses:Rent 500.00 GBP 29000.00 GBP
+16-Dec-01 Forecast transaction Expenses:Rent 500.00 GBP 29500.00 GBP
+end test
+
+test --now 2012-01-01 --forecast-years 1 --forecast "T<200000.00 GBP" reg :rent
+12-Feb-01 Forecast transaction Expenses:Rent 500.00 GBP 500.00 GBP
+12-Mar-01 Forecast transaction Expenses:Rent 500.00 GBP 1000.00 GBP
+12-Apr-01 Forecast transaction Expenses:Rent 500.00 GBP 1500.00 GBP
+12-May-01 Forecast transaction Expenses:Rent 500.00 GBP 2000.00 GBP
+12-Jun-01 Forecast transaction Expenses:Rent 500.00 GBP 2500.00 GBP
+12-Jul-01 Forecast transaction Expenses:Rent 500.00 GBP 3000.00 GBP
+12-Aug-01 Forecast transaction Expenses:Rent 500.00 GBP 3500.00 GBP
+12-Sep-01 Forecast transaction Expenses:Rent 500.00 GBP 4000.00 GBP
+12-Oct-01 Forecast transaction Expenses:Rent 500.00 GBP 4500.00 GBP
+12-Nov-01 Forecast transaction Expenses:Rent 500.00 GBP 5000.00 GBP
+12-Dec-01 Forecast transaction Expenses:Rent 500.00 GBP 5500.00 GBP
+end test
+
+test --now 2012-01-01 --forecast-years 10 --forecast "T<200000.00 GBP" reg :rent
+12-Feb-01 Forecast transaction Expenses:Rent 500.00 GBP 500.00 GBP
+12-Mar-01 Forecast transaction Expenses:Rent 500.00 GBP 1000.00 GBP
+12-Apr-01 Forecast transaction Expenses:Rent 500.00 GBP 1500.00 GBP
+12-May-01 Forecast transaction Expenses:Rent 500.00 GBP 2000.00 GBP
+12-Jun-01 Forecast transaction Expenses:Rent 500.00 GBP 2500.00 GBP
+12-Jul-01 Forecast transaction Expenses:Rent 500.00 GBP 3000.00 GBP
+12-Aug-01 Forecast transaction Expenses:Rent 500.00 GBP 3500.00 GBP
+12-Sep-01 Forecast transaction Expenses:Rent 500.00 GBP 4000.00 GBP
+12-Oct-01 Forecast transaction Expenses:Rent 500.00 GBP 4500.00 GBP
+12-Nov-01 Forecast transaction Expenses:Rent 500.00 GBP 5000.00 GBP
+12-Dec-01 Forecast transaction Expenses:Rent 500.00 GBP 5500.00 GBP
+13-Jan-01 Forecast transaction Expenses:Rent 500.00 GBP 6000.00 GBP
+13-Feb-01 Forecast transaction Expenses:Rent 500.00 GBP 6500.00 GBP
+13-Mar-01 Forecast transaction Expenses:Rent 500.00 GBP 7000.00 GBP
+13-Apr-01 Forecast transaction Expenses:Rent 500.00 GBP 7500.00 GBP
+13-May-01 Forecast transaction Expenses:Rent 500.00 GBP 8000.00 GBP
+13-Jun-01 Forecast transaction Expenses:Rent 500.00 GBP 8500.00 GBP
+13-Jul-01 Forecast transaction Expenses:Rent 500.00 GBP 9000.00 GBP
+13-Aug-01 Forecast transaction Expenses:Rent 500.00 GBP 9500.00 GBP
+13-Sep-01 Forecast transaction Expenses:Rent 500.00 GBP 10000.00 GBP
+13-Oct-01 Forecast transaction Expenses:Rent 500.00 GBP 10500.00 GBP
+13-Nov-01 Forecast transaction Expenses:Rent 500.00 GBP 11000.00 GBP
+13-Dec-01 Forecast transaction Expenses:Rent 500.00 GBP 11500.00 GBP
+14-Jan-01 Forecast transaction Expenses:Rent 500.00 GBP 12000.00 GBP
+14-Feb-01 Forecast transaction Expenses:Rent 500.00 GBP 12500.00 GBP
+14-Mar-01 Forecast transaction Expenses:Rent 500.00 GBP 13000.00 GBP
+14-Apr-01 Forecast transaction Expenses:Rent 500.00 GBP 13500.00 GBP
+14-May-01 Forecast transaction Expenses:Rent 500.00 GBP 14000.00 GBP
+14-Jun-01 Forecast transaction Expenses:Rent 500.00 GBP 14500.00 GBP
+14-Jul-01 Forecast transaction Expenses:Rent 500.00 GBP 15000.00 GBP
+14-Aug-01 Forecast transaction Expenses:Rent 500.00 GBP 15500.00 GBP
+14-Sep-01 Forecast transaction Expenses:Rent 500.00 GBP 16000.00 GBP
+14-Oct-01 Forecast transaction Expenses:Rent 500.00 GBP 16500.00 GBP
+14-Nov-01 Forecast transaction Expenses:Rent 500.00 GBP 17000.00 GBP
+14-Dec-01 Forecast transaction Expenses:Rent 500.00 GBP 17500.00 GBP
+15-Jan-01 Forecast transaction Expenses:Rent 500.00 GBP 18000.00 GBP
+15-Feb-01 Forecast transaction Expenses:Rent 500.00 GBP 18500.00 GBP
+15-Mar-01 Forecast transaction Expenses:Rent 500.00 GBP 19000.00 GBP
+15-Apr-01 Forecast transaction Expenses:Rent 500.00 GBP 19500.00 GBP
+15-May-01 Forecast transaction Expenses:Rent 500.00 GBP 20000.00 GBP
+15-Jun-01 Forecast transaction Expenses:Rent 500.00 GBP 20500.00 GBP
+15-Jul-01 Forecast transaction Expenses:Rent 500.00 GBP 21000.00 GBP
+15-Aug-01 Forecast transaction Expenses:Rent 500.00 GBP 21500.00 GBP
+15-Sep-01 Forecast transaction Expenses:Rent 500.00 GBP 22000.00 GBP
+15-Oct-01 Forecast transaction Expenses:Rent 500.00 GBP 22500.00 GBP
+15-Nov-01 Forecast transaction Expenses:Rent 500.00 GBP 23000.00 GBP
+15-Dec-01 Forecast transaction Expenses:Rent 500.00 GBP 23500.00 GBP
+16-Jan-01 Forecast transaction Expenses:Rent 500.00 GBP 24000.00 GBP
+16-Feb-01 Forecast transaction Expenses:Rent 500.00 GBP 24500.00 GBP
+16-Mar-01 Forecast transaction Expenses:Rent 500.00 GBP 25000.00 GBP
+16-Apr-01 Forecast transaction Expenses:Rent 500.00 GBP 25500.00 GBP
+16-May-01 Forecast transaction Expenses:Rent 500.00 GBP 26000.00 GBP
+16-Jun-01 Forecast transaction Expenses:Rent 500.00 GBP 26500.00 GBP
+16-Jul-01 Forecast transaction Expenses:Rent 500.00 GBP 27000.00 GBP
+16-Aug-01 Forecast transaction Expenses:Rent 500.00 GBP 27500.00 GBP
+16-Sep-01 Forecast transaction Expenses:Rent 500.00 GBP 28000.00 GBP
+16-Oct-01 Forecast transaction Expenses:Rent 500.00 GBP 28500.00 GBP
+16-Nov-01 Forecast transaction Expenses:Rent 500.00 GBP 29000.00 GBP
+16-Dec-01 Forecast transaction Expenses:Rent 500.00 GBP 29500.00 GBP
+17-Jan-01 Forecast transaction Expenses:Rent 500.00 GBP 30000.00 GBP
+17-Feb-01 Forecast transaction Expenses:Rent 500.00 GBP 30500.00 GBP
+17-Mar-01 Forecast transaction Expenses:Rent 500.00 GBP 31000.00 GBP
+17-Apr-01 Forecast transaction Expenses:Rent 500.00 GBP 31500.00 GBP
+17-May-01 Forecast transaction Expenses:Rent 500.00 GBP 32000.00 GBP
+17-Jun-01 Forecast transaction Expenses:Rent 500.00 GBP 32500.00 GBP
+17-Jul-01 Forecast transaction Expenses:Rent 500.00 GBP 33000.00 GBP
+17-Aug-01 Forecast transaction Expenses:Rent 500.00 GBP 33500.00 GBP
+17-Sep-01 Forecast transaction Expenses:Rent 500.00 GBP 34000.00 GBP
+17-Oct-01 Forecast transaction Expenses:Rent 500.00 GBP 34500.00 GBP
+17-Nov-01 Forecast transaction Expenses:Rent 500.00 GBP 35000.00 GBP
+17-Dec-01 Forecast transaction Expenses:Rent 500.00 GBP 35500.00 GBP
+18-Jan-01 Forecast transaction Expenses:Rent 500.00 GBP 36000.00 GBP
+18-Feb-01 Forecast transaction Expenses:Rent 500.00 GBP 36500.00 GBP
+18-Mar-01 Forecast transaction Expenses:Rent 500.00 GBP 37000.00 GBP
+18-Apr-01 Forecast transaction Expenses:Rent 500.00 GBP 37500.00 GBP
+18-May-01 Forecast transaction Expenses:Rent 500.00 GBP 38000.00 GBP
+18-Jun-01 Forecast transaction Expenses:Rent 500.00 GBP 38500.00 GBP
+18-Jul-01 Forecast transaction Expenses:Rent 500.00 GBP 39000.00 GBP
+18-Aug-01 Forecast transaction Expenses:Rent 500.00 GBP 39500.00 GBP
+18-Sep-01 Forecast transaction Expenses:Rent 500.00 GBP 40000.00 GBP
+18-Oct-01 Forecast transaction Expenses:Rent 500.00 GBP 40500.00 GBP
+18-Nov-01 Forecast transaction Expenses:Rent 500.00 GBP 41000.00 GBP
+18-Dec-01 Forecast transaction Expenses:Rent 500.00 GBP 41500.00 GBP
+19-Jan-01 Forecast transaction Expenses:Rent 500.00 GBP 42000.00 GBP
+19-Feb-01 Forecast transaction Expenses:Rent 500.00 GBP 42500.00 GBP
+19-Mar-01 Forecast transaction Expenses:Rent 500.00 GBP 43000.00 GBP
+19-Apr-01 Forecast transaction Expenses:Rent 500.00 GBP 43500.00 GBP
+19-May-01 Forecast transaction Expenses:Rent 500.00 GBP 44000.00 GBP
+19-Jun-01 Forecast transaction Expenses:Rent 500.00 GBP 44500.00 GBP
+19-Jul-01 Forecast transaction Expenses:Rent 500.00 GBP 45000.00 GBP
+19-Aug-01 Forecast transaction Expenses:Rent 500.00 GBP 45500.00 GBP
+19-Sep-01 Forecast transaction Expenses:Rent 500.00 GBP 46000.00 GBP
+19-Oct-01 Forecast transaction Expenses:Rent 500.00 GBP 46500.00 GBP
+19-Nov-01 Forecast transaction Expenses:Rent 500.00 GBP 47000.00 GBP
+19-Dec-01 Forecast transaction Expenses:Rent 500.00 GBP 47500.00 GBP
+20-Jan-01 Forecast transaction Expenses:Rent 500.00 GBP 48000.00 GBP
+20-Feb-01 Forecast transaction Expenses:Rent 500.00 GBP 48500.00 GBP
+20-Mar-01 Forecast transaction Expenses:Rent 500.00 GBP 49000.00 GBP
+20-Apr-01 Forecast transaction Expenses:Rent 500.00 GBP 49500.00 GBP
+20-May-01 Forecast transaction Expenses:Rent 500.00 GBP 50000.00 GBP
+20-Jun-01 Forecast transaction Expenses:Rent 500.00 GBP 50500.00 GBP
+20-Jul-01 Forecast transaction Expenses:Rent 500.00 GBP 51000.00 GBP
+20-Aug-01 Forecast transaction Expenses:Rent 500.00 GBP 51500.00 GBP
+20-Sep-01 Forecast transaction Expenses:Rent 500.00 GBP 52000.00 GBP
+20-Oct-01 Forecast transaction Expenses:Rent 500.00 GBP 52500.00 GBP
+20-Nov-01 Forecast transaction Expenses:Rent 500.00 GBP 53000.00 GBP
+20-Dec-01 Forecast transaction Expenses:Rent 500.00 GBP 53500.00 GBP
+21-Jan-01 Forecast transaction Expenses:Rent 500.00 GBP 54000.00 GBP
+21-Feb-01 Forecast transaction Expenses:Rent 500.00 GBP 54500.00 GBP
+21-Mar-01 Forecast transaction Expenses:Rent 500.00 GBP 55000.00 GBP
+21-Apr-01 Forecast transaction Expenses:Rent 500.00 GBP 55500.00 GBP
+21-May-01 Forecast transaction Expenses:Rent 500.00 GBP 56000.00 GBP
+21-Jun-01 Forecast transaction Expenses:Rent 500.00 GBP 56500.00 GBP
+21-Jul-01 Forecast transaction Expenses:Rent 500.00 GBP 57000.00 GBP
+21-Aug-01 Forecast transaction Expenses:Rent 500.00 GBP 57500.00 GBP
+21-Sep-01 Forecast transaction Expenses:Rent 500.00 GBP 58000.00 GBP
+21-Oct-01 Forecast transaction Expenses:Rent 500.00 GBP 58500.00 GBP
+21-Nov-01 Forecast transaction Expenses:Rent 500.00 GBP 59000.00 GBP
+21-Dec-01 Forecast transaction Expenses:Rent 500.00 GBP 59500.00 GBP
+end test
+
diff --git a/test/baseline/opt-group-by.test b/test/baseline/opt-group-by.test
index e69de29b..1f6c6adf 100644
--- a/test/baseline/opt-group-by.test
+++ b/test/baseline/opt-group-by.test
@@ -0,0 +1,114 @@
+2012-03-20 * Test GBP
+ A -10.00 GBP
+ B
+
+2012-03-20 * Test EUR
+ A -10.00 EUR
+ B
+
+2012-03-22 * Test GBP
+ A -10.00 GBP
+ B
+
+2012-03-22 * Test EUR
+ A -10.00 EUR
+ B
+
+2012-03-25 * Test GBP
+ A -10.00 GBP
+ B
+
+2012-03-25 * Test EUR
+ A -10.00 EUR
+ B
+
+test reg --group-by payee
+Test EUR
+12-Mar-20 Test EUR A -10.00 EUR -10.00 EUR
+ B 10.00 EUR 0
+12-Mar-22 Test EUR A -10.00 EUR -10.00 EUR
+ B 10.00 EUR 0
+12-Mar-25 Test EUR A -10.00 EUR -10.00 EUR
+ B 10.00 EUR 0
+
+Test GBP
+12-Mar-20 Test GBP A -10.00 GBP -10.00 GBP
+ B 10.00 GBP 0
+12-Mar-22 Test GBP A -10.00 GBP -10.00 GBP
+ B 10.00 GBP 0
+12-Mar-25 Test GBP A -10.00 GBP -10.00 GBP
+ B 10.00 GBP 0
+end test
+
+test reg --group-by commodity
+EUR
+12-Mar-20 Test EUR A -10.00 EUR -10.00 EUR
+ B 10.00 EUR 0
+12-Mar-22 Test EUR A -10.00 EUR -10.00 EUR
+ B 10.00 EUR 0
+12-Mar-25 Test EUR A -10.00 EUR -10.00 EUR
+ B 10.00 EUR 0
+
+GBP
+12-Mar-20 Test GBP A -10.00 GBP -10.00 GBP
+ B 10.00 GBP 0
+12-Mar-22 Test GBP A -10.00 GBP -10.00 GBP
+ B 10.00 GBP 0
+12-Mar-25 Test GBP A -10.00 GBP -10.00 GBP
+ B 10.00 GBP 0
+end test
+
+test bal --group-by commodity
+EUR
+ -30.00 EUR A
+ 30.00 EUR B
+--------------------
+ 0
+
+GBP
+ -30.00 GBP A
+ 30.00 GBP B
+--------------------
+ 0
+end test
+
+test bal --group-by payee
+Test EUR
+ -30.00 EUR A
+ 30.00 EUR B
+--------------------
+ 0
+
+Test GBP
+ -30.00 GBP A
+ 30.00 GBP B
+--------------------
+ 0
+end test
+
+test bal --group-by date
+2012/03/20
+ -10.00 EUR
+ -10.00 GBP A
+ 10.00 EUR
+ 10.00 GBP B
+--------------------
+ 0
+
+2012/03/22
+ -10.00 EUR
+ -10.00 GBP A
+ 10.00 EUR
+ 10.00 GBP B
+--------------------
+ 0
+
+2012/03/25
+ -10.00 EUR
+ -10.00 GBP A
+ 10.00 EUR
+ 10.00 GBP B
+--------------------
+ 0
+end test
+
diff --git a/test/baseline/opt-group-title-format.test b/test/baseline/opt-group-title-format.test
index e69de29b..a2a1a984 100644
--- a/test/baseline/opt-group-title-format.test
+++ b/test/baseline/opt-group-title-format.test
@@ -0,0 +1,48 @@
+2012-03-20 * Test GBP
+ A -10.00 GBP
+ B
+
+2012-03-20 * Test EUR
+ A -10.00 EUR
+ B
+
+2012-03-22 * Test GBP
+ A -10.00 GBP
+ B
+
+2012-03-22 * Test EUR
+ A -10.00 EUR
+ B
+
+test bal --group-by payee --group-title-format "-%(value)-\n"
+-Test EUR-
+ -20.00 EUR A
+ 20.00 EUR B
+--------------------
+ 0
+
+-Test GBP-
+ -20.00 GBP A
+ 20.00 GBP B
+--------------------
+ 0
+end test
+
+test bal --group-by date --group-title-format "|%(value)|\n"
+|2012/03/20|
+ -10.00 EUR
+ -10.00 GBP A
+ 10.00 EUR
+ 10.00 GBP B
+--------------------
+ 0
+
+|2012/03/22|
+ -10.00 EUR
+ -10.00 GBP A
+ 10.00 EUR
+ 10.00 GBP B
+--------------------
+ 0
+end test
+
diff --git a/test/baseline/opt-inject.test b/test/baseline/opt-inject.test
index e69de29b..685cf12c 100644
--- a/test/baseline/opt-inject.test
+++ b/test/baseline/opt-inject.test
@@ -0,0 +1,10 @@
+2012-03-20 * Test GBP
+ ; Expected:: -15.00 GBP
+ Expenses:Phone 20.00 GBP
+ Assets:Cash
+
+test --inject Expected reg Expenses:Phone
+12-Mar-20 Test GBP Expected -15.00 GBP -15.00 GBP
+12-Mar-20 Test GBP Expenses:Phone 20.00 GBP 5.00 GBP
+end test
+
diff --git a/test/baseline/opt-lot-notes.test b/test/baseline/opt-lot-notes.test
index e69de29b..3bfa9e45 100644
--- a/test/baseline/opt-lot-notes.test
+++ b/test/baseline/opt-lot-notes.test
@@ -0,0 +1,31 @@
+2012-01-01 * Opening balance
+ Assets:Cash 100.00 GBP
+ Equity:Opening Balance
+
+2012-01-02 * Voucher 1
+ Assets:Voucher 10.00 GBP (aaaa)
+ Assets:Cash -10.00 GBP
+
+2012-01-03 * Voucher 1
+ Assets:Voucher 10.00 GBP (bbbb)
+ Assets:Cash -10.00 GBP
+
+2012-01-04 * Voucher 1
+ Assets:Voucher 10.00 GBP (cccc)
+ Assets:Cash -10.00 GBP
+
+test bal assets:voucher --lot-notes
+ 10.00 GBP (aaaa)
+ 10.00 GBP (bbbb)
+ 10.00 GBP (cccc) Assets:Voucher
+end test
+
+test reg assets:voucher --lot-notes
+12-Jan-02 Voucher 1 Assets:Voucher 10.00 GBP (aaaa) 10.00 GBP (aaaa)
+12-Jan-03 Voucher 1 Assets:Voucher 10.00 GBP (bbbb) 10.00 GBP (aaaa)
+ 10.00 GBP (bbbb)
+12-Jan-04 Voucher 1 Assets:Voucher 10.00 GBP (cccc) 10.00 GBP (aaaa)
+ 10.00 GBP (bbbb)
+ 10.00 GBP (cccc)
+end test
+