summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/baseline/opt-equity.test2
-rw-r--r--test/baseline/opt-lot-dates.test2
-rw-r--r--test/baseline/opt-lots-actual.test2
-rw-r--r--test/baseline/opt-lots.test2
-rw-r--r--test/baseline/opt-register-format.test2
-rw-r--r--test/regress/383.test29
-rw-r--r--test/regress/494-a.ledger10
-rw-r--r--test/regress/494-b.ledger17
-rw-r--r--test/regress/78AB4B87_py.test2
-rw-r--r--test/regress/9188F587_py.test2
-rw-r--r--test/regress/error-in-include.dat5
-rw-r--r--test/regress/error-in-include.test17
12 files changed, 85 insertions, 7 deletions
diff --git a/test/baseline/opt-equity.test b/test/baseline/opt-equity.test
index 35ea6b1e..faffc085 100644
--- a/test/baseline/opt-equity.test
+++ b/test/baseline/opt-equity.test
@@ -46,7 +46,7 @@ test equity --lot-prices
Equity:Opening Balances 3.80 GBP
end test
-test equity --lots
+test equity --lots --date-format %Y/%m/%d
2011/03/05 Opening Balances
Assets:Bank -3.80 GBP
Assets:Broker 2 AAA {0.90 GBP} [2011/03/04]
diff --git a/test/baseline/opt-lot-dates.test b/test/baseline/opt-lot-dates.test
index c07e96e8..b74dfe27 100644
--- a/test/baseline/opt-lot-dates.test
+++ b/test/baseline/opt-lot-dates.test
@@ -549,7 +549,7 @@ D 1.00G
Assets:Tajer:Items "Orb of Deception" 1 @ 155G
Assets:Tajer
-test reg -F '%(justify(scrub(total_expr), 80, 80, true))\n' --lot-dates
+test reg -F '%(justify(scrub(total_expr), 80, 80, true))\n' --lot-dates --date-format %Y/%m/%d
133.98G
158.85G
0
diff --git a/test/baseline/opt-lots-actual.test b/test/baseline/opt-lots-actual.test
index 395b0eaf..6cd9b2f4 100644
--- a/test/baseline/opt-lots-actual.test
+++ b/test/baseline/opt-lots-actual.test
@@ -5,7 +5,7 @@ D 1.0000s
Assets:Gruulmorg 248720c @ 10.051463493s
Equity:Gold -5000000s
-test reg --format '%(justify(scrub(total_expr), 40, 40, true))\n' --lots
+test reg --format '%(justify(scrub(total_expr), 40, 40, true))\n' --lots --date-format %Y/%m/%d
1339829c {1.86590975416s} [2006/03/14]
1339829c {1.86590975416s} [2006/03/14]
248720c {10.051463493s} [2006/03/14]
diff --git a/test/baseline/opt-lots.test b/test/baseline/opt-lots.test
index bd47fb1e..7a86c662 100644
--- a/test/baseline/opt-lots.test
+++ b/test/baseline/opt-lots.test
@@ -549,7 +549,7 @@ D 1.00G
Assets:Tajer:Items "Orb of Deception" 1 @ 155G
Assets:Tajer
-test reg -F '%(justify(scrub(total_expr), 80, 80, true))\n' --lots
+test reg -F '%(justify(scrub(total_expr), 80, 80, true))\n' --lots --date-format %Y/%m/%d
133.98G
158.85G
0
diff --git a/test/baseline/opt-register-format.test b/test/baseline/opt-register-format.test
index 384accd8..843aa3ca 100644
--- a/test/baseline/opt-register-format.test
+++ b/test/baseline/opt-register-format.test
@@ -3,6 +3,6 @@
Income:Dividends:Vanguard:VMMXX $-0.35
test reg --register-format='%(amount)\n'
-0.350 VMMXX {$1.00} [2007/02/02]
+0.350 VMMXX {$1.00} [07-Feb-02]
$-0.35
end test
diff --git a/test/regress/383.test b/test/regress/383.test
new file mode 100644
index 00000000..ab4372fd
--- /dev/null
+++ b/test/regress/383.test
@@ -0,0 +1,29 @@
+
+--input-date-format %Y:%m:%d
+
+D 1000.00 GBP
+
+2014:05:12 * Test
+ Assets:Investments 100 AA {2.00 GBP} [2014:01:01] @@ 200.00 GBP
+ Equity:Opening balance
+
+test bal Assets:Investments --lots --date-format %Y.%m.%d
+100 AA {2.00 GBP} [2014.01.01] Assets:Investments
+end test
+
+test bal Assets:Investments --lots --date-format %Y/%m/%d
+100 AA {2.00 GBP} [2014/01/01] Assets:Investments
+end test
+
+test bal Assets:Investments --lots --date-format %Y:%m:%d
+100 AA {2.00 GBP} [2014:01:01] Assets:Investments
+end test
+
+test bal Assets:Investments --lots --date-format %Y-%m-%d
+100 AA {2.00 GBP} [2014-01-01] Assets:Investments
+end test
+
+test bal Assets:Investments --lots --date-format %g-%b-%d
+100 AA {2.00 GBP} [14-Jan-01] Assets:Investments
+end test
+
diff --git a/test/regress/494-a.ledger b/test/regress/494-a.ledger
new file mode 100644
index 00000000..4094f7dc
--- /dev/null
+++ b/test/regress/494-a.ledger
@@ -0,0 +1,10 @@
+
+15.03.2006 Exxon
+ Expenses:Auto:Gas 10,00 €
+ Liabilities:MasterCard -10,00 €
+
+test --input-date-format '%d.%m.%Y' reg
+06-Mar-15 Exxon Expenses:Auto:Gas 10,00 € 10,00 €
+ Liabilities:MasterCard -10,00 € 0
+end test
+
diff --git a/test/regress/494-b.ledger b/test/regress/494-b.ledger
new file mode 100644
index 00000000..40e8b1b7
--- /dev/null
+++ b/test/regress/494-b.ledger
@@ -0,0 +1,17 @@
+
+--input-date-format %d.%m
+
+Y2010
+03.01 * Foo
+ A 10.00 EUR
+ B
+
+05.02 * Bar
+ A 20.00 EUR
+ B
+
+test reg A
+10-Jan-03 Foo A 10.00 EUR 10.00 EUR
+10-Feb-05 Bar A 20.00 EUR 30.00 EUR
+end test
+
diff --git a/test/regress/78AB4B87_py.test b/test/regress/78AB4B87_py.test
index 8f847145..cbfe9c6a 100644
--- a/test/regress/78AB4B87_py.test
+++ b/test/regress/78AB4B87_py.test
@@ -5,7 +5,7 @@ Total is presently: (0.00 EUR)
Converted to EUR: (-5.73 EUR)
Total is now: (-5.73 EUR)
--5.00 EUR {0.8733 GBP} [2012/01/03]
+-5.00 EUR {0.8733 GBP} [12-Jan-03]
EUR
Total is presently: (-5.73 EUR)
Converted to EUR: (-5.00 EUR)
diff --git a/test/regress/9188F587_py.test b/test/regress/9188F587_py.test
index 28bb34ff..e431af90 100644
--- a/test/regress/9188F587_py.test
+++ b/test/regress/9188F587_py.test
@@ -5,7 +5,7 @@ Total is presently: (0.00 EUR)
Converted to EUR: (-6.00 EUR)
Total is now: (-6.00 EUR)
--5.00 EUR {0.8733 GBP} [2012/01/03]
+-5.00 EUR {0.8733 GBP} [12-Jan-03]
EUR
Total is presently: (-6.00 EUR)
Converted to EUR: (-5.00 EUR)
diff --git a/test/regress/error-in-include.dat b/test/regress/error-in-include.dat
new file mode 100644
index 00000000..9f654a42
--- /dev/null
+++ b/test/regress/error-in-include.dat
@@ -0,0 +1,5 @@
+
+2014-05-13 * Does not balance
+ A $10.00
+ B -$11.00
+
diff --git a/test/regress/error-in-include.test b/test/regress/error-in-include.test
new file mode 100644
index 00000000..58a06e25
--- /dev/null
+++ b/test/regress/error-in-include.test
@@ -0,0 +1,17 @@
+
+!include error-in-include.dat
+
+test bal -> 1
+__ERROR__
+In file included from "$FILE", line 2:
+While parsing file "$sourcepath/test/regress/error-in-include.dat", line 4:
+While balancing transaction from "$sourcepath/test/regress/error-in-include.dat", lines 2-4:
+> 2014-05-13 * Does not balance
+> A $10.00
+> B -$11.00
+Unbalanced remainder is:
+ $-1.00
+Amount to balance against:
+ $10.00
+Error: Transaction does not balance
+end test