summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-06-26 17:09:34 +0100
committerJohn Wiegley <johnw@newartisans.com>2009-06-26 17:15:35 +0100
commit2ef1934bb0dbcd08dfe8d4dc68bfd1509c8f51ce (patch)
tree5225fc7f164feed6a0af36f552b9fa713a3d8840 /test
parent4574c30fcfd3b03bab9a368a6ff2928af7e11e28 (diff)
downloadfork-ledger-2ef1934bb0dbcd08dfe8d4dc68bfd1509c8f51ce.tar.gz
fork-ledger-2ef1934bb0dbcd08dfe8d4dc68bfd1509c8f51ce.tar.bz2
fork-ledger-2ef1934bb0dbcd08dfe8d4dc68bfd1509c8f51ce.zip
Restored --price option, added baseline test
This option reports only in terms of the annotated price of the commodities involved, otherwise it reports the amounts themselves. It can be used in conjunction with other reports, as it applies to the displayed amounts, not the actual amounts being calculated.
Diffstat (limited to 'test')
-rw-r--r--test/baseline/opt-price.test47
1 files changed, 47 insertions, 0 deletions
diff --git a/test/baseline/opt-price.test b/test/baseline/opt-price.test
new file mode 100644
index 00000000..06cc7751
--- /dev/null
+++ b/test/baseline/opt-price.test
@@ -0,0 +1,47 @@
+reg equities
+<<<
+2008/01/01 * Purchase Apple shares
+ Equities 1000 AAPL @ $2
+ Cash $-2000
+
+2008/06/30 * Sell some Apple shares
+ Cash $1250
+ Equities -500 AAPL {$2} @ $2.50
+ Income:Gains $-250
+
+P 2008/10/01 02:18:02 AAPL $3
+P 2009/01/31 02:18:02 AAPL $4
+P 3000/01/01 02:18:02 APPL $100
+>>>1
+08-Jan-01 Purchase Apple shares Equities 1000 AAPL 1000 AAPL
+08-Jun-30 Sell some Apple sha.. Equities -500 AAPL 500 AAPL
+>>>2
+=== 0
+reg -B equities
+>>>1
+08-Jan-01 Purchase Apple shares Equities $2000 $2000
+08-Jun-30 Sell some Apple sha.. Equities $-1250 $750
+>>>2
+=== 0
+reg --end 2009/06/26 -V equities
+>>>1
+08-Jan-01 Purchase Apple shares Equities $2000 $2000
+08-Jun-30 Commodities revalued <Revalued> $500 $2500
+08-Jun-30 Sell some Apple sha.. Equities $-1250 $1250
+09-Jun-26 Commodities revalued <Revalued> $750 $2000
+>>>2
+=== 0
+reg --end 2009/06/26 -G equities
+>>>1
+08-Jan-01 Purchase Apple shares Equities 0 0
+08-Jun-30 Commodities revalued <Revalued> $500 $500
+08-Jun-30 Sell some Apple sha.. Equities 0 $500
+09-Jun-26 Commodities revalued <Revalued> $750 $1250
+>>>2
+=== 0
+reg -I equities
+>>>1
+08-Jan-01 Purchase Apple shares Equities $2000 $2000
+08-Jun-30 Sell some Apple sha.. Equities $-1000 $1000
+>>>2
+=== 0