summaryrefslogtreecommitdiff
path: root/test/baseline/opt-market.test
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-22 22:22:07 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-22 22:23:02 -0400
commitde6de07bac1337b0dd87b41c853369dc8432c2af (patch)
tree7a03ec320c4c359d3ca16c163badb797f96b92ee /test/baseline/opt-market.test
parentea418c7fbcd54d7222583914477d087fe7d6c5e8 (diff)
downloadfork-ledger-de6de07bac1337b0dd87b41c853369dc8432c2af.tar.gz
fork-ledger-de6de07bac1337b0dd87b41c853369dc8432c2af.tar.bz2
fork-ledger-de6de07bac1337b0dd87b41c853369dc8432c2af.zip
Many fixes to --market and --exchange
Also, --exchange now accepted multiple, comma-separated commodities.
Diffstat (limited to 'test/baseline/opt-market.test')
-rw-r--r--test/baseline/opt-market.test60
1 files changed, 60 insertions, 0 deletions
diff --git a/test/baseline/opt-market.test b/test/baseline/opt-market.test
new file mode 100644
index 00000000..1d68fe3a
--- /dev/null
+++ b/test/baseline/opt-market.test
@@ -0,0 +1,60 @@
+reg --market stocks
+<<<
+2009/01/01 Sample 1a
+ Assets:Brokerage:Stocks 100 S
+ Assets:Brokerage:Cash -100 P
+
+P 2009/01/01 00:00:00 S 2 P
+
+2009/02/01 Sample 2a
+ Assets:Brokerage:Stocks 100 S @ 1 P
+ Assets:Brokerage:Cash
+
+P 2009/02/01 00:00:00 S 4 P
+
+2009/03/01 Sample 3a
+ Assets:Brokerage:Stocks 100 S @@ 100 P
+ Assets:Brokerage:Cash
+
+P 2009/03/01 00:00:00 S 8 P
+
+2009/04/01 Sample 4a
+ Assets:Brokerage:Cash 100 P
+ Assets:Brokerage:Stocks -100 S {1 P}
+
+P 2009/04/01 00:00:00 S 16 P
+
+; In this usage case, the top amount is always secondary
+; 2010/01/01 Sample 1b
+; Assets:Brokerage:Cash -100 P
+; Assets:Brokerage:Stocks 100 S
+;
+; P 2010/01/01 00:00:00 S 2 P
+
+2010/02/01 Sample 2b
+ Assets:Brokerage:Cash
+ Assets:Brokerage:Stocks 100 S @ 1 P
+
+P 2010/02/01 00:00:00 S 4 P
+
+2010/03/01 Sample 3b
+ Assets:Brokerage:Cash
+ Assets:Brokerage:Stocks 100 S @@ 100 P
+
+P 2010/03/01 00:00:00 S 8 P
+
+2010/04/01 Sample 4b
+ Assets:Brokerage:Stocks -100 S {1 P}
+ Assets:Brokerage:Cash 100 P
+
+P 2010/04/01 00:00:00 S 16 P
+>>>1
+09-Jan-01 Sample 1a As:Brokerage:Stocks 200 P 200 P
+09-Feb-01 Sample 2a As:Brokerage:Stocks 400 P 800 P
+09-Mar-01 Sample 3a As:Brokerage:Stocks 800 P 2400 P
+09-Apr-01 Sample 4a As:Brokerage:Stocks -1600 P 3200 P
+10-Feb-01 Sample 2b As:Brokerage:Stocks 400 P 1200 P
+10-Mar-01 Sample 3b As:Brokerage:Stocks 800 P 3200 P
+10-Apr-01 Sample 4b As:Brokerage:Stocks -1600 P 4800 P
+>>>2
+=== 0