summaryrefslogtreecommitdiff
path: root/test/regress/713-a.test
diff options
context:
space:
mode:
authorMartin Michlmayr <tbm@cyrius.com>2014-07-14 20:44:05 -0400
committerMartin Michlmayr <tbm@cyrius.com>2014-07-14 20:44:05 -0400
commit7241b1f62b8a441b11ea96a7a45674c1e11fecd8 (patch)
tree575d1a5d60a05a80264496d12fa3fb0934eb310b /test/regress/713-a.test
parent2854ecdd1930ea98c2aecc80d08f37ef8ee5f93d (diff)
downloadfork-ledger-7241b1f62b8a441b11ea96a7a45674c1e11fecd8.tar.gz
fork-ledger-7241b1f62b8a441b11ea96a7a45674c1e11fecd8.tar.bz2
fork-ledger-7241b1f62b8a441b11ea96a7a45674c1e11fecd8.zip
Add regression tests for bug #713
Diffstat (limited to 'test/regress/713-a.test')
-rw-r--r--test/regress/713-a.test40
1 files changed, 40 insertions, 0 deletions
diff --git a/test/regress/713-a.test b/test/regress/713-a.test
new file mode 100644
index 00000000..b3953a84
--- /dev/null
+++ b/test/regress/713-a.test
@@ -0,0 +1,40 @@
+
+2011-01-01 * Opening balance
+ Assets:Cash 25.00 GBP
+ Equity:Opening balance -25.00 GBP
+
+2011-02-01 * Buy 1 AAA for 10.00 GBP
+ Assets:Investments 1 AAA {10.00 GBP}
+ Assets:Cash -10.00 GBP
+
+2011-03-07 * Sell one AAA with a gain
+ Assets:Cash 12.00 GBP
+ Assets:Investments -1 AAA {10.00 GBP} @@ 12.00 GBP
+ Income:Capital gains -2.00 GBP
+
+2011-04-01 * Buy 1 BBB for 15.00 GBP
+ Assets:Investments 1 BBB {15.00 GBP}
+ Assets:Cash -15.00 GBP
+
+test bal -B Assets:Investments -p "until 2011-02-20"
+ 10.00 GBP Assets:Investments
+end test
+
+test bal -B Assets:Investments -p "until 2011-03-20"
+end test
+
+test bal -B Assets:Investments -p "until 2011-04-20"
+ 15.00 GBP Assets:Investments
+end test
+
+test bal Assets:Investments -p "until 2011-02-20"
+ 1 AAA Assets:Investments
+end test
+
+test bal Assets:Investments -p "until 2011-03-20"
+end test
+
+test bal Assets:Investments -p "until 2011-04-20"
+ 1 BBB Assets:Investments
+end test
+