summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/baseline/dir-commodity-alias.test23
-rw-r--r--test/regress/C19E4E9B.test18
-rw-r--r--test/regress/EA18D948.test14
3 files changed, 55 insertions, 0 deletions
diff --git a/test/baseline/dir-commodity-alias.test b/test/baseline/dir-commodity-alias.test
new file mode 100644
index 00000000..4de7f406
--- /dev/null
+++ b/test/baseline/dir-commodity-alias.test
@@ -0,0 +1,23 @@
+commodity $
+ alias USD
+
+2012-03-12 * $
+ A $10.00
+ B
+
+2012-03-12 * USD
+ A 15.00 USD
+ B
+
+test bal
+ 25.00 $ A
+ -25.00 $ B
+--------------------
+ 0
+end test
+
+test reg a
+12-Mar-12 $ A 10.00 $ 10.00 $
+12-Mar-12 USD A 15.00 $ 25.00 $
+end test
+
diff --git a/test/regress/C19E4E9B.test b/test/regress/C19E4E9B.test
new file mode 100644
index 00000000..4837b4cd
--- /dev/null
+++ b/test/regress/C19E4E9B.test
@@ -0,0 +1,18 @@
+2012-01-01=2012-01-02 * Buy AAA
+ A 1 AAA @ 1.00 EUR
+ B -1.00 EUR
+
+2012-02-01 * Buy AAA
+ A 1 AAA @ 2.00 EUR
+ B -2.00 EUR
+
+test reg --format "%S: %d %P %t %T\n"
+$FILE: 2012/01/01 Buy AAA 1 AAA 1 AAA
+$FILE: 2012/01/01 Buy AAA -1.00 EUR 1 AAA
+-1.00 EUR
+$FILE: 2012/02/01 Buy AAA 1 AAA 2 AAA
+-1.00 EUR
+$FILE: 2012/02/01 Buy AAA -2.00 EUR 2 AAA
+-3.00 EUR
+end test
+
diff --git a/test/regress/EA18D948.test b/test/regress/EA18D948.test
new file mode 100644
index 00000000..a63d4c35
--- /dev/null
+++ b/test/regress/EA18D948.test
@@ -0,0 +1,14 @@
+2012-01-01 * Buy AAA
+ A 1 AAA @ 1.00 EUR
+ B -1.00 EUR
+
+2012-02-01 * Buy AAA
+ A 1 AAA @ 2.00 EUR
+ B -2.00 EUR
+
+test reg A -V -A
+12-Jan-01 Buy AAA A 1.00 EUR 1.00 EUR
+12-Feb-01 Commodities revalued <Revalued> 1.00 EUR 0
+12-Feb-01 Buy AAA A 2.00 EUR 2.00 EUR
+end test
+