diff options
author | Martin Michlmayr <tbm@cyrius.com> | 2014-07-14 20:44:05 -0400 |
---|---|---|
committer | Martin Michlmayr <tbm@cyrius.com> | 2014-07-14 20:44:05 -0400 |
commit | 7241b1f62b8a441b11ea96a7a45674c1e11fecd8 (patch) | |
tree | 575d1a5d60a05a80264496d12fa3fb0934eb310b /test/regress/713-b.test | |
parent | 2854ecdd1930ea98c2aecc80d08f37ef8ee5f93d (diff) | |
download | fork-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-b.test')
-rw-r--r-- | test/regress/713-b.test | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/test/regress/713-b.test b/test/regress/713-b.test new file mode 100644 index 00000000..36685b27 --- /dev/null +++ b/test/regress/713-b.test @@ -0,0 +1,48 @@ + +2014-01-01 * Opening balances + Assets:Cash 100.00 GBP + Equity:Opening balances + +2014-02-01 * Buy 1 AAA for 10 GBP + Assets:Investments 1 AAA @ 10.00 GBP + Assets:Cash -10.00 GBP + +2014-03-01 * Buy 1 AAA for 20 GBP + Assets:Investments 1 AAA @ 20.00 GBP + Assets:Cash -20.00 GBP + +; Let's say the second purchase attracts an equalisation of 2.00 GBP. +; This means that the purchase price from now on should be 18.00 +; rather than 20.00 GBP. So we add a new share with that price and +; the original date, and remove the existing share at the old price; the +; difference of 2.00 GBP is the equalisation received, which is paid to +; the account. +2014-04-16 * Dividend (Equalisation) from AAA + Assets:Investments 1 AAA {18.00 GBP} [2014-03-01] @@ 18.00 GBP + Assets:Investments -1 AAA {20.00 GBP} [2014-03-01] @@ 20.00 GBP + Assets:Broker 2.00 GBP + +test bal -B Assets:Investment -p "until 2014-02-20" + 10.00 GBP Assets:Investments +end test + +test bal -B Assets:Investment -p "until 2014-03-20" + 30.00 GBP Assets:Investments +end test + +test bal -B Assets:Investment -p "until 2014-04-20" + 28.00 GBP Assets:Investments +end test + +test bal Assets:Investment -p "until 2014-02-20" + 1 AAA Assets:Investments +end test + +test bal Assets:Investment -p "until 2014-03-20" + 2 AAA Assets:Investments +end test + +test bal Assets:Investment -p "until 2014-04-20" + 2 AAA Assets:Investments +end test + |