summaryrefslogtreecommitdiff
path: root/test/regress
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-20 14:40:33 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-20 15:41:49 -0400
commit40f2ff6d6f7902c4957e0710a5a9d09c1f49ad1e (patch)
tree1acf02e4fffb46649e06d537451fe26ee988916e /test/regress
parent42f94d2b8bcbc58abd5e09c0c1e98b8dd167552b (diff)
downloadfork-ledger-40f2ff6d6f7902c4957e0710a5a9d09c1f49ad1e.tar.gz
fork-ledger-40f2ff6d6f7902c4957e0710a5a9d09c1f49ad1e.tar.bz2
fork-ledger-40f2ff6d6f7902c4957e0710a5a9d09c1f49ad1e.zip
Added several new regression tests
Diffstat (limited to 'test/regress')
-rw-r--r--test/regress/1CF1EEC2.test27
-rw-r--r--test/regress/205.test2
-rw-r--r--test/regress/2E3496BD.test18
-rw-r--r--test/regress/3AB70168.test13
-rw-r--r--test/regress/55831A79.test24
-rw-r--r--test/regress/E4C9A8EA.test24
6 files changed, 107 insertions, 1 deletions
diff --git a/test/regress/1CF1EEC2.test b/test/regress/1CF1EEC2.test
new file mode 100644
index 00000000..a22ae2b8
--- /dev/null
+++ b/test/regress/1CF1EEC2.test
@@ -0,0 +1,27 @@
+equity --args-only assets
+<<<
+2009/01/01 sample
+ Assets:Super:ARF $1000.00
+ Assets:Super:CSS $1000.00
+ Assets:Super:CSS:Contributions $1000.00
+ Income:Opening Balances
+
+2009/02/01 sample
+ Assets:Super:ARF $1000.00
+ Assets:Super:CSS $1000.00
+ Assets:Super:CSS:Contributions $1000.00
+ Income:Opening Balances
+
+2009/03/01 sample
+ Assets:Super:ARF $1000.00
+ Assets:Super:CSS $1000.00
+ Assets:Super:CSS:Contributions $1000.00
+ Income:Opening Balances
+>>>1
+2009/03/01 Opening Balances
+ Assets:Super:ARF $3000.00
+ Assets:Super:CSS $3000.00
+ Assets:Super:CSS:Contributions $3000.00
+ Equity:Opening Balances $-9000.00
+>>>2
+=== 0
diff --git a/test/regress/205.test b/test/regress/205.test
index 2de1f78e..b277f496 100644
--- a/test/regress/205.test
+++ b/test/regress/205.test
@@ -1,4 +1,4 @@
-bal
+bal --args-only
<<<
2007/02/02 RD VMMXX
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
diff --git a/test/regress/2E3496BD.test b/test/regress/2E3496BD.test
new file mode 100644
index 00000000..9458c21e
--- /dev/null
+++ b/test/regress/2E3496BD.test
@@ -0,0 +1,18 @@
+bal --args-only
+<<<
+D 1,000.00 USD
+
+2007-12-31 * Start of year / Opening balances.
+ Account1 1000 EUR @ 1.6 USD
+ Account2 -1000 EUR @ 1.5 USD
+>>>1
+>>>2
+While parsing file "bug.dat", line 8:
+While balancing entry from "bug.dat", lines 6-8:
+> 2007-12-31 * Start of year / Opening balances.
+> Account1 1000 EUR @ 1.6 USD
+> Account2 -1000 EUR @ 1.5 USD
+Unbalanced remainder is:
+ 100.00 USD
+Error: Entry does not balance
+=== 1
diff --git a/test/regress/3AB70168.test b/test/regress/3AB70168.test
new file mode 100644
index 00000000..ecac8a74
--- /dev/null
+++ b/test/regress/3AB70168.test
@@ -0,0 +1,13 @@
+bal --args-only --base
+<<<
+i 2007/03/01 23:00:00 A
+o 2007/03/02 01:00:00
+i 2007/03/11 23:00:00 B
+o 2007/03/12 01:00:00
+>>>1
+ 7200s A
+ 7200s B
+--------------------
+ 14400s
+>>>2
+=== 0
diff --git a/test/regress/55831A79.test b/test/regress/55831A79.test
new file mode 100644
index 00000000..30c09c3d
--- /dev/null
+++ b/test/regress/55831A79.test
@@ -0,0 +1,24 @@
+bal --args-only discover
+<<<
+2008/01/01 * previous balances
+ liabilities:credit cards:discover 4462 $-1094.38
+ equity:opening balances
+
+2008/01/18 * DISCOVER FEES
+ liabilities:credit cards:discover 4462:interest $-36.59
+ assets:bank:wells fargo:checking
+
+2008/01/18 * DISCOVER FEES
+ liabilities:credit cards:discover 4462:fee $-39
+ liabilities:credit cards:discover 4462:interest $-28.17
+ assets:bank:wells fargo:checking
+
+2008/3/1 * discover card payment
+ liabilities:credit cards:discover 4462 $1198.14
+ assets:bank:wells fargo:checking
+>>>1
+ 0 liabilities:credit cards:discover 4462
+ $-39.00 fee
+ $-64.76 interest
+>>>2
+=== 0
diff --git a/test/regress/E4C9A8EA.test b/test/regress/E4C9A8EA.test
new file mode 100644
index 00000000..fe2d4aab
--- /dev/null
+++ b/test/regress/E4C9A8EA.test
@@ -0,0 +1,24 @@
+reg --args-only --columns=80
+<<<
+2007/12/31 * Cost basis for: RED HAT INC RHT
+ Assets:Investments:RBC-Broker:Account-RSP 4 RHT
+ Equity:Opening-Balances:Cost -689.87 CAD
+
+2008/01/03=2007/12/28 * Sell -- RHT -- RED HAT INC CA TAUX DE CHANGE .96590
+ Assets:Investments:RBC-Broker:Account-RSP -4.00 RHT @ 21.14 CAD
+ Expenses:Financial:Commissions 9.95 USD @ 0.96590 CAD
+ Assets:Investments:RBC-Broker:Account-RSP 72.06 CAD
+ Expenses:Financial:Fees
+>>>1
+07-Dec-31 Cost basis for: RED.. As:In:RB:Account-RSP 4.00 RHT 4.00 RHT
+ Eq:Op:Cost -689.87 CAD -689.87 CAD
+ 4.00 RHT
+08-Jan-03 Sell -- RHT -- RED .. As:In:RB:Account-RSP -4.00 RHT -689.87 CAD
+ Ex:Fi:Commissions 9.95 USD -689.87 CAD
+ 9.95 USD
+ As:In:RB:Account-RSP 72.06 CAD -617.81 CAD
+ 9.95 USD
+ Ex:Financial:Fees 2.89 CAD -614.92 CAD
+ 9.95 USD
+>>>2
+=== 0