summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMartin Michlmayr <tbm@cyrius.com>2019-12-25 15:25:45 +0200
committerMartin Michlmayr <tbm@cyrius.com>2019-12-25 15:25:45 +0200
commit8702c1079effb9df15a6022372ccfdc2e7d23eea (patch)
tree753e0ec847926880f5525b896b0479d0c5739dd5 /test
parentb935b0ccf8503de8c087d748ebf298458128631f (diff)
downloadfork-ledger-8702c1079effb9df15a6022372ccfdc2e7d23eea.tar.gz
fork-ledger-8702c1079effb9df15a6022372ccfdc2e7d23eea.tar.bz2
fork-ledger-8702c1079effb9df15a6022372ccfdc2e7d23eea.zip
Add test for --average-lot-prices
Diffstat (limited to 'test')
-rwxr-xr-xtest/CheckBaselineTests.py1
-rw-r--r--test/baseline/opt-average-lot-prices.test16
2 files changed, 16 insertions, 1 deletions
diff --git a/test/CheckBaselineTests.py b/test/CheckBaselineTests.py
index 71f1610a..f53c59a2 100755
--- a/test/CheckBaselineTests.py
+++ b/test/CheckBaselineTests.py
@@ -21,7 +21,6 @@ class CheckBaselineTests (CheckOptions):
self.untested_options = [
'anon',
'args-only',
- 'average-lot-prices',
'debug',
'download',
'force-pager',
diff --git a/test/baseline/opt-average-lot-prices.test b/test/baseline/opt-average-lot-prices.test
new file mode 100644
index 00000000..c9fe4846
--- /dev/null
+++ b/test/baseline/opt-average-lot-prices.test
@@ -0,0 +1,16 @@
+2019-01-01 * Opening balance
+ Assets:Investments 1000.00 EUR
+ Equity:Opening balance -1000.00 EUR
+
+2019-03-01 * Bought FOO
+ Assets:Investments 2 FOO @ 150.00 EUR
+ Assets:Investments -300.00 EUR
+
+2019-06-01 * Bought FOO
+ Assets:Investments 1 FOO @ 180.00 EUR
+ Assets:Investments -180.00 EUR
+
+test bal assets:investments --average-lot-prices
+ 520.00 EUR
+ 3 FOO {160.00 EUR} Assets:Investments
+end test