diff options
author | Martin Michlmayr <tbm@cyrius.com> | 2014-07-14 21:09:57 -0400 |
---|---|---|
committer | Martin Michlmayr <tbm@cyrius.com> | 2014-07-14 21:09:57 -0400 |
commit | 3f9fc276d3a802ebdd3c694029d56b948fecb841 (patch) | |
tree | 08ffacae3c1d72251d8ba25a446c5ea10140f40f /test/regress | |
parent | 511b17a21f79bbb19fe151402b07e3d0cc3948ec (diff) | |
parent | b88634206402814f63ba8db192e52d3e3bec2b38 (diff) | |
download | fork-ledger-3f9fc276d3a802ebdd3c694029d56b948fecb841.tar.gz fork-ledger-3f9fc276d3a802ebdd3c694029d56b948fecb841.tar.bz2 fork-ledger-3f9fc276d3a802ebdd3c694029d56b948fecb841.zip |
Merge pull request #310 from tbm/712-713-costs
Change the definition of cost
Diffstat (limited to 'test/regress')
-rw-r--r-- | test/regress/712-a.test (renamed from test/regress/712.test) | 0 | ||||
-rw-r--r-- | test/regress/712-b.test | 22 | ||||
-rw-r--r-- | test/regress/713-a.test | 40 | ||||
-rw-r--r-- | test/regress/713-b.test | 48 | ||||
-rw-r--r-- | test/regress/C0212EAC.test | 3 | ||||
-rw-r--r-- | test/regress/CAE63F5C-b.test | 3 | ||||
-rw-r--r-- | test/regress/CAE63F5C-c.test | 3 |
7 files changed, 112 insertions, 7 deletions
diff --git a/test/regress/712.test b/test/regress/712-a.test index e0dbfa5a..e0dbfa5a 100644 --- a/test/regress/712.test +++ b/test/regress/712-a.test diff --git a/test/regress/712-b.test b/test/regress/712-b.test new file mode 100644 index 00000000..7f183b5f --- /dev/null +++ b/test/regress/712-b.test @@ -0,0 +1,22 @@ + +2011-01-01 * Opening balance + Assets:Cash 10.00 GBP + Equity:Opening balance -10.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-12-07 * Sell 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 + +test bal + 12.00 GBP Assets:Cash + -10.00 GBP Equity:Opening balance + -2.00 GBP Income:Capital gains +-------------------- + 0 +end test + 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 + 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 + diff --git a/test/regress/C0212EAC.test b/test/regress/C0212EAC.test index 9a572ef6..e77107d7 100644 --- a/test/regress/C0212EAC.test +++ b/test/regress/C0212EAC.test @@ -27,7 +27,4 @@ test reg -5.00 GBP {=1.40 EUR} Income:Gain -0.50 EUR 5.00 GBP -5.00 GBP {=1.40 EUR} - Equity:Capital Gains 0.50 EUR 0.50 EUR - 5.00 GBP - -5.00 GBP {=1.40 EUR} end test diff --git a/test/regress/CAE63F5C-b.test b/test/regress/CAE63F5C-b.test index c0b7efd8..e1ea049e 100644 --- a/test/regress/CAE63F5C-b.test +++ b/test/regress/CAE63F5C-b.test @@ -7,9 +7,8 @@ test bal -X $ $272.67 Accrued $-271.54 Assets - $6.45 Equity:Capital Gains $5.32 Expenses $-6.45 Income:Currency Conversion -------------------- - $6.45 + 0 end test diff --git a/test/regress/CAE63F5C-c.test b/test/regress/CAE63F5C-c.test index 64728544..db318b2d 100644 --- a/test/regress/CAE63F5C-c.test +++ b/test/regress/CAE63F5C-c.test @@ -7,9 +7,8 @@ test bal -X $ $272.67 Accrued $-271.54 Assets - $6.45 Equity:Capital Gains $5.32 Expenses $-6.45 Income:Currency Conversion -------------------- - $6.46 + 0 end test |