summaryrefslogtreecommitdiff
path: root/test/baseline
diff options
context:
space:
mode:
Diffstat (limited to 'test/baseline')
-rw-r--r--test/baseline/cmd-script.test4
-rw-r--r--test/baseline/dir-commodity-value.test24
-rw-r--r--test/baseline/dir-import_py.test23
-rw-r--r--test/baseline/feat-annotations.test37
-rw-r--r--test/baseline/feat-balance_assert.test13
-rw-r--r--test/baseline/feat-value-expr.test99
-rw-r--r--test/baseline/opt-dc.test16
-rw-r--r--test/baseline/opt-deviation.test2
-rw-r--r--test/baseline/opt-exchange.test57
-rw-r--r--test/baseline/opt-historical.test250
-rw-r--r--test/baseline/opt-immediate.test0
-rw-r--r--test/baseline/opt-lot-notes.test0
-rw-r--r--test/baseline/opt-meta-width.test4
-rw-r--r--test/baseline/opt-no-pager.test0
-rw-r--r--test/baseline/opt-unround.test2
-rw-r--r--test/baseline/opt-value-expr.test0
16 files changed, 527 insertions, 4 deletions
diff --git a/test/baseline/cmd-script.test b/test/baseline/cmd-script.test
index ce920ebb..b33dd82d 100644
--- a/test/baseline/cmd-script.test
+++ b/test/baseline/cmd-script.test
@@ -15,3 +15,7 @@ test eval 'foo = x, y, z -> print(x, y, z); foo(1, 2, 3)'
123
1
end test
+
+test eval 'foo(x,y)=y(1, 2, 3);foo(amount_expr, (s,d,t -> t))'
+3
+end test
diff --git a/test/baseline/dir-commodity-value.test b/test/baseline/dir-commodity-value.test
new file mode 100644
index 00000000..5e8fe789
--- /dev/null
+++ b/test/baseline/dir-commodity-value.test
@@ -0,0 +1,24 @@
+commodity $
+ value 10 EUR
+
+commodity USD
+ alias FOO
+ value 25 EUR
+
+2012-03-06 KFC
+ Expenses:Food $20.00
+ Assets:Cash
+
+2012-03-08 KFC
+ Expenses:Food USD 750,00
+ Assets:Cash
+
+2012-03-10 KFC
+ Expenses:Food USD 750,00
+ Assets:Cash
+
+test reg food -X EUR --now=2012-03-15
+12-Mar-06 KFC Expenses:Food 200 EUR 200 EUR
+12-Mar-08 KFC Expenses:Food 18750 EUR 18950 EUR
+12-Mar-10 KFC Expenses:Food 18750 EUR 37700 EUR
+end test
diff --git a/test/baseline/dir-import_py.test b/test/baseline/dir-import_py.test
new file mode 100644
index 00000000..ee9f6001
--- /dev/null
+++ b/test/baseline/dir-import_py.test
@@ -0,0 +1,23 @@
+import os
+
+tag PATH
+ check os.path.isfile(value)
+
+2012-02-29 KFC
+ ; PATH: test/baseline/feat-import_py.test
+ Expenses:Food $20
+ Assets:Cash
+
+2012-02-29 KFC
+ ; PATH: test/baseline/feat-import_noexist.test
+ Expenses:Food $20
+ Assets:Cash
+
+test reg
+12-Feb-29 KFC Expenses:Food $20 $20
+ Assets:Cash $-20 0
+12-Feb-29 KFC Expenses:Food $20 $20
+ Assets:Cash $-20 0
+__ERROR__
+Warning: "$sourcepath/test/baseline/dir-import_py.test", line 14: Metadata check failed for (PATH: test/baseline/feat-import_noexist.test): ((os.path).isfile(value))
+end test
diff --git a/test/baseline/feat-annotations.test b/test/baseline/feat-annotations.test
new file mode 100644
index 00000000..18f5d7d9
--- /dev/null
+++ b/test/baseline/feat-annotations.test
@@ -0,0 +1,37 @@
+2012-03-09 KFC
+ Expenses:Food 10 CHIK @ $50
+ Assets:Cash
+
+2012-03-09 KFC
+ Assets:Cash $75
+ Expenses:Food -10 CHIK {{$50}} @ $75
+ Equity:Capital Gains $-25
+
+2012-03-09 KFC
+ Expenses:Food 10 CHIK
+ Assets:Cash $-50
+
+2012-03-09 KFC
+ Assets:Cash $75
+ Expenses:Food -10 CHIK {{$50}}
+ Equity:Capital Gains $-25
+
+test print
+2012/03/09 KFC
+ Expenses:Food 10 CHIK @ $50
+ Assets:Cash
+
+2012/03/09 KFC
+ Assets:Cash $75
+ Expenses:Food -10 CHIK {$5} @ $75
+ Equity:Capital Gains $-25
+
+2012/03/09 KFC
+ Expenses:Food 10 CHIK
+ Assets:Cash $-50
+
+2012/03/09 KFC
+ Assets:Cash $75
+ Expenses:Food -10 CHIK {$5}
+ Equity:Capital Gains $-25
+end test
diff --git a/test/baseline/feat-balance_assert.test b/test/baseline/feat-balance_assert.test
new file mode 100644
index 00000000..a03cbb0e
--- /dev/null
+++ b/test/baseline/feat-balance_assert.test
@@ -0,0 +1,13 @@
+2012-01-01 Opening Balance
+ Assets:Checking $100
+ Equity
+
+2012-01-01 Reconciliation
+ [Assets:Checking] = $100
+
+test balance
+ $100 Assets:Checking
+ $-100 Equity
+--------------------
+ 0
+end test
diff --git a/test/baseline/feat-value-expr.test b/test/baseline/feat-value-expr.test
new file mode 100644
index 00000000..01f9780b
--- /dev/null
+++ b/test/baseline/feat-value-expr.test
@@ -0,0 +1,99 @@
+;; A valuation function receives three arguments:
+;;
+;; 'source' A string identifying the commodity whose price
+;; is being asked for (example: "EUR")
+;;
+;; 'date' The reference date the price should be relative.
+;;
+;; 'target' A string identifying the "target" commodity, or
+;; the commodity the returned price should be in.
+;; This argument is null if -V was used instead of -X.
+;;
+;; The valuation function should return an amount. If you've written your
+;; function in Python, you can return something like Amount("$100"). If the
+;; function returns an explicit value, that value is always used, regardless
+;; of the commodity, the date, or the desired target commodity.
+
+define myfunc_seven(s, d, t) = 7 EUR
+
+;; In order to specific a fixed price, but still valuate that price into the
+;; target commodity, use something like this:
+
+define myfunc_five(s, d, t) = market(5 EUR, d, t)
+
+;; The 'value' directive sets the valuation used for all commodities used in
+;; the rest of the daat stream. This is the fallback, if nothing more
+;; specific is found.
+
+value myfunc_seven
+
+;; You can set a specific valuation function on a per-commodity basis.
+;; Instead of defining a function, you can also pass a lambda.
+
+commodity $
+ value s, d, t -> 6 EUR
+
+;; Each account can also provide a default valuation function for any
+;; commodities transferred to that account.
+
+account Expenses:Food5
+ value myfunc_five
+
+;; The metadata field "Value", if found, overrides the valuation function on a
+;; transaction-wide or per-posting basis.
+
+= @XACT and Food
+ ; Value:: 8 EUR
+ (Equity) $1
+
+= @POST and Dining
+ (Expenses:Food9) $1
+ ; Value:: 9 EUR
+
+;; Lastly, you can specify the valuation function/value for any specific
+;; amount using the (( )) commodity annotation.
+
+2012-03-02 KFC
+ Expenses:Food2 $1 ((2 EUR))
+ Assets:Cash2
+
+2012-03-03 KFC
+ Expenses:Food3 $1
+ ; Value:: 3 EUR
+ Assets:Cash3
+
+2012-03-04 KFC
+ ; Value:: 4 EUR
+ Expenses:Food4 $1
+ Assets:Cash4
+
+2012-03-05 KFC
+ Expenses:Food5 $1
+ Assets:Cash5
+
+2012-03-06 KFC
+ Expenses:Food6 $1
+ Assets:Cash6
+
+2012-03-07 KFC
+ Expenses:Food7 1 CAD
+ Assets:Cas7
+
+2012-03-08 XACT
+ Expenses:Food8 $1
+ Assets:Cash8
+
+2012-03-09 POST
+ Expenses:Dining9 $1
+ Assets:Cash9
+
+test reg -V food
+12-Mar-02 KFC Expenses:Food2 2 EUR 2 EUR
+12-Mar-03 KFC Expenses:Food3 3 EUR 5 EUR
+12-Mar-04 KFC Expenses:Food4 4 EUR 9 EUR
+12-Mar-05 KFC Expenses:Food5 5 EUR 14 EUR
+12-Mar-06 KFC Expenses:Food6 6 EUR 20 EUR
+12-Mar-07 KFC Expenses:Food7 7 EUR 27 EUR
+12-Mar-08 XACT Expenses:Food8 8 EUR 35 EUR
+12-Mar-09 POST (Expenses:Food9) 9 EUR 44 EUR
+end test
diff --git a/test/baseline/opt-dc.test b/test/baseline/opt-dc.test
new file mode 100644
index 00000000..24a564dd
--- /dev/null
+++ b/test/baseline/opt-dc.test
@@ -0,0 +1,16 @@
+2012-03-10 Employer
+ Assets:Cash $100
+ Income:Employer
+
+2012-03-10 KFC
+ Expenses:Food $20
+ Assets:Cash
+
+2012-03-10 KFC - Rebate
+ Assets:Cash
+ Expenses:Food $-5
+
+2012-03-10 KFC - Food & Rebate
+ Expenses:Food $20
+ Expenses:Food $-5
+ Assets:Cash
diff --git a/test/baseline/opt-deviation.test b/test/baseline/opt-deviation.test
index df216b9c..a677ff6e 100644
--- a/test/baseline/opt-deviation.test
+++ b/test/baseline/opt-deviation.test
@@ -190,7 +190,7 @@
Expenses:Books $120.00
Assets:Cash
-test reg --deviation books
+test reg -A --deviation books
08-Jan-01 January Expenses:Books $10.00 0
08-Jan-31 End of January Expenses:Books $10.00 0
08-Feb-01 February Expenses:Books $20.00 $6.67
diff --git a/test/baseline/opt-exchange.test b/test/baseline/opt-exchange.test
index cfc48c3f..f5d73f78 100644
--- a/test/baseline/opt-exchange.test
+++ b/test/baseline/opt-exchange.test
@@ -53,6 +53,63 @@ test reg --exchange=' C, A '
Assets:Brokerage -75 A 75 A
09-Jan-01 January 1st, 2009 (3) Assets:Brokerage 100 A 175 A
Assets:Brokerage -100 A 75 A
+09-Jan-02 Commodities revalued <Revalued> 225 A
+ -1800 C 300 A
+ -1800 C
+09-Jan-02 January 2nd, 2009 Assets:Brokerage 500 C 300 A
+ -1300 C
+ Assets:Brokerage -500 C 300 A
+ -1800 C
+09-Jan-03 January 3rd, 2009 Assets:Brokerage 600 C 300 A
+ -1200 C
+ Assets:Brokerage -600 C 300 A
+ -1800 C
+09-Jan-04 January 4th, 2009 Assets:Brokerage 300 A 600 A
+ -1800 C
+ Assets:Brokerage -2400 C 600 A
+ -4200 C
+09-Jan-05 January 5th, 2009 Assets:Brokerage 1280 C 600 A
+ -2920 C
+ Assets:Brokerage -1280 C 600 A
+ -4200 C
+09-Jan-06 Commodities revalued <Revalued> 2040 C 600 A
+ -2160 C
+09-Jan-06 January 6th, 2009 Assets:Brokerage 155 A 755 A
+ -2160 C
+ Assets:Brokerage -186 C 755 A
+ -2346 C
+09-Jan-07 Commodities revalued <Revalued> -86 C 755 A
+ -2432 C
+09-Jan-07 January 7th, 2009 Assets:Brokerage 155 A 910 A
+ -2432 C
+ Assets:Brokerage -200 C 910 A
+ -2632 C
+09-Jan-08 Commodities revalued <Revalued> -5613 C 910 A
+ -8245 C
+09-Jan-08 January 8th, 2009 Assets:Brokerage 155 A 1065 A
+ -8245 C
+ Assets:Brokerage -200 C 1065 A
+ -8445 C
+09-Jan-09 Commodities revalued <Revalued> -2800 C 1065 A
+ -11245 C
+09-Jan-09 January 9th, 2009 Assets:Brokerage 200 C 1065 A
+ -11045 C
+ Assets:Brokerage -155 A 910 A
+ -11045 C
+09-Jan-10 January 10th, 2009 Assets:Brokerage 200 C 910 A
+ -10845 C
+ Assets:Brokerage -155 A 755 A
+ -10845 C
+end test
+
+
+test reg --exchange=' C!, A '
+09-Jan-01 January 1st, 2009 (1) Assets:Brokerage 100 A 100 A
+ Assets:Brokerage -50 A 50 A
+09-Jan-01 January 1st, 2009 (2) Assets:Brokerage 100 A 150 A
+ Assets:Brokerage -75 A 75 A
+09-Jan-01 January 1st, 2009 (3) Assets:Brokerage 100 A 175 A
+ Assets:Brokerage -100 A 75 A
09-Jan-02 Commodities revalued <Revalued> 0 600 C
09-Jan-02 January 2nd, 2009 Assets:Brokerage 500 C 1100 C
Assets:Brokerage -500 C 600 C
diff --git a/test/baseline/opt-historical.test b/test/baseline/opt-historical.test
new file mode 100644
index 00000000..9eb3558b
--- /dev/null
+++ b/test/baseline/opt-historical.test
@@ -0,0 +1,250 @@
+D EUR 2.000,00
+
+P 2011-12-15 $ EUR 2
+P 2011-12-15 AAPL $5.00
+
+2012-01-01 Broker
+ Assets:Stocks 10 AAPL {$1} @ $10
+ Equity
+
+P 2012-01-15 AAPL $15.00
+
+2012-02-02 Broker
+ Assets:Stocks 10 AAPL {$2} @ $20
+ Equity
+
+P 2012-02-15 AAPL $25.00
+
+2012-03-03 Broker
+ Assets:Stocks 10 AAPL {$3} @ $30
+ Equity
+
+P 2012-03-15 AAPL $35.00
+
+2012-04-04 Broker
+ Assets:Stocks 10 AAPL {$4} @ $40
+ Equity
+
+P 2012-04-15 AAPL $45.00
+
+2012-05-05 Broker
+ Assets:Stocks 10 AAPL {$5} @ $50
+ Equity
+
+P 2012-5-15 AAPL $55.00
+
+test reg stocks
+12-Jan-01 Broker Assets:Stocks 10 AAPL 10 AAPL
+12-Feb-02 Broker Assets:Stocks 10 AAPL 20 AAPL
+12-Mar-03 Broker Assets:Stocks 10 AAPL 30 AAPL
+12-Apr-04 Broker Assets:Stocks 10 AAPL 40 AAPL
+12-May-05 Broker Assets:Stocks 10 AAPL 50 AAPL
+end test
+
+test reg stocks -O
+12-Jan-01 Broker Assets:Stocks 10 AAPL 10 AAPL
+12-Feb-02 Broker Assets:Stocks 10 AAPL 20 AAPL
+12-Mar-03 Broker Assets:Stocks 10 AAPL 30 AAPL
+12-Apr-04 Broker Assets:Stocks 10 AAPL 40 AAPL
+12-May-05 Broker Assets:Stocks 10 AAPL 50 AAPL
+end test
+
+test reg stocks -B
+12-Jan-01 Broker Assets:Stocks $100 $100
+12-Feb-02 Broker Assets:Stocks $200 $300
+12-Mar-03 Broker Assets:Stocks $300 $600
+12-Apr-04 Broker Assets:Stocks $400 $1000
+12-May-05 Broker Assets:Stocks $500 $1500
+end test
+
+test reg stocks -I
+12-Jan-01 Broker Assets:Stocks $10 $10
+12-Feb-02 Broker Assets:Stocks $20 $30
+12-Mar-03 Broker Assets:Stocks $30 $60
+12-Apr-04 Broker Assets:Stocks $40 $100
+12-May-05 Broker Assets:Stocks $50 $150
+end test
+
+test reg stocks -V
+12-Jan-01 Broker Assets:Stocks $100 $100
+12-Jan-15 Commodities revalued <Revalued> $50 $150
+12-Feb-02 Commodities revalued <Revalued> $50 $200
+12-Feb-02 Broker Assets:Stocks $200 $400
+12-Feb-15 Commodities revalued <Revalued> $100 $500
+12-Mar-03 Commodities revalued <Revalued> $100 $600
+12-Mar-03 Broker Assets:Stocks $300 $900
+12-Mar-15 Commodities revalued <Revalued> $150 $1050
+12-Apr-04 Commodities revalued <Revalued> $150 $1200
+12-Apr-04 Broker Assets:Stocks $400 $1600
+12-Apr-15 Commodities revalued <Revalued> $200 $1800
+12-May-05 Commodities revalued <Revalued> $200 $2000
+12-May-05 Broker Assets:Stocks $500 $2500
+end test
+
+test reg stocks -O -V
+12-Jan-01 Broker Assets:Stocks $100 $100
+12-Jan-15 Commodities revalued <Revalued> $50 $150
+12-Feb-02 Commodities revalued <Revalued> $50 $200
+12-Feb-02 Broker Assets:Stocks $200 $400
+12-Feb-15 Commodities revalued <Revalued> $100 $500
+12-Mar-03 Commodities revalued <Revalued> $100 $600
+12-Mar-03 Broker Assets:Stocks $300 $900
+12-Mar-15 Commodities revalued <Revalued> $150 $1050
+12-Apr-04 Commodities revalued <Revalued> $150 $1200
+12-Apr-04 Broker Assets:Stocks $400 $1600
+12-Apr-15 Commodities revalued <Revalued> $200 $1800
+12-May-05 Commodities revalued <Revalued> $200 $2000
+12-May-05 Broker Assets:Stocks $500 $2500
+end test
+
+test reg stocks -B -V
+12-Jan-01 Broker Assets:Stocks $100 $100
+12-Feb-02 Broker Assets:Stocks $200 $300
+12-Mar-03 Broker Assets:Stocks $300 $600
+12-Apr-04 Broker Assets:Stocks $400 $1000
+12-May-05 Broker Assets:Stocks $500 $1500
+end test
+
+test reg stocks -I -V
+12-Jan-01 Broker Assets:Stocks $10 $10
+12-Feb-02 Broker Assets:Stocks $20 $30
+12-Mar-03 Broker Assets:Stocks $30 $60
+12-Apr-04 Broker Assets:Stocks $40 $100
+12-May-05 Broker Assets:Stocks $50 $150
+end test
+
+test reg stocks -X EUR
+12-Jan-01 Broker Assets:Stocks EUR 200,00 EUR 200,00
+12-Feb-02 Commodities revalued <Revalued> EUR 200,00 EUR 400,00
+12-Feb-02 Broker Assets:Stocks EUR 400,00 EUR 800,00
+12-Mar-03 Commodities revalued <Revalued> EUR 400,00 EUR 1.200,00
+12-Mar-03 Broker Assets:Stocks EUR 600,00 EUR 1.800,00
+12-Apr-04 Commodities revalued <Revalued> EUR 600,00 EUR 2.400,00
+12-Apr-04 Broker Assets:Stocks EUR 800,00 EUR 3.200,00
+12-May-05 Commodities revalued <Revalued> EUR 800,00 EUR 4.000,00
+12-May-05 Broker Assets:Stocks EUR 1.000,00 EUR 5.000,00
+end test
+
+test reg stocks -O -X EUR
+12-Jan-01 Broker Assets:Stocks EUR 200,00 EUR 200,00
+12-Feb-02 Commodities revalued <Revalued> EUR 200,00 EUR 400,00
+12-Feb-02 Broker Assets:Stocks EUR 400,00 EUR 800,00
+12-Mar-03 Commodities revalued <Revalued> EUR 400,00 EUR 1.200,00
+12-Mar-03 Broker Assets:Stocks EUR 600,00 EUR 1.800,00
+12-Apr-04 Commodities revalued <Revalued> EUR 600,00 EUR 2.400,00
+12-Apr-04 Broker Assets:Stocks EUR 800,00 EUR 3.200,00
+12-May-05 Commodities revalued <Revalued> EUR 800,00 EUR 4.000,00
+12-May-05 Broker Assets:Stocks EUR 1.000,00 EUR 5.000,00
+end test
+
+test reg stocks -B -X EUR
+12-Jan-01 Broker Assets:Stocks EUR 200,00 EUR 200,00
+12-Feb-02 Broker Assets:Stocks EUR 400,00 EUR 600,00
+12-Mar-03 Broker Assets:Stocks EUR 600,00 EUR 1.200,00
+12-Apr-04 Broker Assets:Stocks EUR 800,00 EUR 2.000,00
+12-May-05 Broker Assets:Stocks EUR 1.000,00 EUR 3.000,00
+end test
+
+test reg stocks -I -X EUR
+12-Jan-01 Broker Assets:Stocks EUR 20,00 EUR 20,00
+12-Feb-02 Broker Assets:Stocks EUR 40,00 EUR 60,00
+12-Mar-03 Broker Assets:Stocks EUR 60,00 EUR 120,00
+12-Apr-04 Broker Assets:Stocks EUR 80,00 EUR 200,00
+12-May-05 Broker Assets:Stocks EUR 100,00 EUR 300,00
+end test
+
+test reg stocks -H
+12-Jan-01 Broker Assets:Stocks $100 $100
+12-Feb-02 Broker Assets:Stocks $200 $300
+12-Mar-03 Broker Assets:Stocks $300 $600
+12-Apr-04 Broker Assets:Stocks $400 $1000
+12-May-05 Broker Assets:Stocks $500 $1500
+end test
+
+test reg stocks -O -H
+12-Jan-01 Broker Assets:Stocks $100 $100
+12-Feb-02 Broker Assets:Stocks $200 $300
+12-Mar-03 Broker Assets:Stocks $300 $600
+12-Apr-04 Broker Assets:Stocks $400 $1000
+12-May-05 Broker Assets:Stocks $500 $1500
+end test
+
+test reg stocks -B -H
+12-Jan-01 Broker Assets:Stocks $100 $100
+12-Feb-02 Broker Assets:Stocks $200 $300
+12-Mar-03 Broker Assets:Stocks $300 $600
+12-Apr-04 Broker Assets:Stocks $400 $1000
+12-May-05 Broker Assets:Stocks $500 $1500
+end test
+
+test reg stocks -I -H
+12-Jan-01 Broker Assets:Stocks $10 $10
+12-Feb-02 Broker Assets:Stocks $20 $30
+12-Mar-03 Broker Assets:Stocks $30 $60
+12-Apr-04 Broker Assets:Stocks $40 $100
+12-May-05 Broker Assets:Stocks $50 $150
+end test
+
+test reg stocks -H -V
+12-Jan-01 Broker Assets:Stocks $100 $100
+12-Feb-02 Broker Assets:Stocks $200 $300
+12-Mar-03 Broker Assets:Stocks $300 $600
+12-Apr-04 Broker Assets:Stocks $400 $1000
+12-May-05 Broker Assets:Stocks $500 $1500
+end test
+
+test reg stocks -O -H -V
+12-Jan-01 Broker Assets:Stocks $100 $100
+12-Feb-02 Broker Assets:Stocks $200 $300
+12-Mar-03 Broker Assets:Stocks $300 $600
+12-Apr-04 Broker Assets:Stocks $400 $1000
+12-May-05 Broker Assets:Stocks $500 $1500
+end test
+
+test reg stocks -B -H -V
+12-Jan-01 Broker Assets:Stocks $100 $100
+12-Feb-02 Broker Assets:Stocks $200 $300
+12-Mar-03 Broker Assets:Stocks $300 $600
+12-Apr-04 Broker Assets:Stocks $400 $1000
+12-May-05 Broker Assets:Stocks $500 $1500
+end test
+
+test reg stocks -I -H -V
+12-Jan-01 Broker Assets:Stocks $10 $10
+12-Feb-02 Broker Assets:Stocks $20 $30
+12-Mar-03 Broker Assets:Stocks $30 $60
+12-Apr-04 Broker Assets:Stocks $40 $100
+12-May-05 Broker Assets:Stocks $50 $150
+end test
+
+test reg stocks -H -X EUR
+12-Jan-01 Broker Assets:Stocks EUR 200,00 EUR 200,00
+12-Feb-02 Broker Assets:Stocks EUR 400,00 EUR 600,00
+12-Mar-03 Broker Assets:Stocks EUR 600,00 EUR 1.200,00
+12-Apr-04 Broker Assets:Stocks EUR 800,00 EUR 2.000,00
+12-May-05 Broker Assets:Stocks EUR 1.000,00 EUR 3.000,00
+end test
+
+test reg stocks -O -H -X EUR
+12-Jan-01 Broker Assets:Stocks EUR 200,00 EUR 200,00
+12-Feb-02 Broker Assets:Stocks EUR 400,00 EUR 600,00
+12-Mar-03 Broker Assets:Stocks EUR 600,00 EUR 1.200,00
+12-Apr-04 Broker Assets:Stocks EUR 800,00 EUR 2.000,00
+12-May-05 Broker Assets:Stocks EUR 1.000,00 EUR 3.000,00
+end test
+
+test reg stocks -B -H -X EUR
+12-Jan-01 Broker Assets:Stocks EUR 200,00 EUR 200,00
+12-Feb-02 Broker Assets:Stocks EUR 400,00 EUR 600,00
+12-Mar-03 Broker Assets:Stocks EUR 600,00 EUR 1.200,00
+12-Apr-04 Broker Assets:Stocks EUR 800,00 EUR 2.000,00
+12-May-05 Broker Assets:Stocks EUR 1.000,00 EUR 3.000,00
+end test
+
+test reg stocks -I -H -X EUR
+12-Jan-01 Broker Assets:Stocks EUR 20,00 EUR 20,00
+12-Feb-02 Broker Assets:Stocks EUR 40,00 EUR 60,00
+12-Mar-03 Broker Assets:Stocks EUR 60,00 EUR 120,00
+12-Apr-04 Broker Assets:Stocks EUR 80,00 EUR 200,00
+12-May-05 Broker Assets:Stocks EUR 100,00 EUR 300,00
+end test
diff --git a/test/baseline/opt-immediate.test b/test/baseline/opt-immediate.test
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/baseline/opt-immediate.test
diff --git a/test/baseline/opt-lot-notes.test b/test/baseline/opt-lot-notes.test
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/baseline/opt-lot-notes.test
diff --git a/test/baseline/opt-meta-width.test b/test/baseline/opt-meta-width.test
index ce751e24..893e175b 100644
--- a/test/baseline/opt-meta-width.test
+++ b/test/baseline/opt-meta-width.test
@@ -9,6 +9,6 @@
; :AnotherTag:
test reg --meta Sample --meta-width=15
-Another Value 04-May-27 Credit card com.. Liab:MasterCard $20.00 $20.00
-Value As:Ban:Checking $-20.00 0
+Another Value 04-May-27 Credit card co.. Liabi:MasterCard $20.00 $20.00
+Value As:Bank:Checking $-20.00 0
end test
diff --git a/test/baseline/opt-no-pager.test b/test/baseline/opt-no-pager.test
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/baseline/opt-no-pager.test
diff --git a/test/baseline/opt-unround.test b/test/baseline/opt-unround.test
index cef212ae..755bb62c 100644
--- a/test/baseline/opt-unround.test
+++ b/test/baseline/opt-unround.test
@@ -82,7 +82,7 @@
Expenses:Travel:Passport $127.00
Assets:Checking
-test bal --unround --percent
+test bal --percent --unround
100.00% Assets:Checking
100.00% Expenses:Travel
92.14958953% Airfare
diff --git a/test/baseline/opt-value-expr.test b/test/baseline/opt-value-expr.test
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/baseline/opt-value-expr.test