summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-20 18:15:43 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-20 18:15:43 -0400
commitb94512e4cce884ad2df4f86e0947f610468e89c2 (patch)
tree8486f97263b3d5f642fbcd5c5db9f2ac102de730
parenta13cafa2f7c105199c23cef185b5bbe2e03ec95b (diff)
downloadfork-ledger-b94512e4cce884ad2df4f86e0947f610468e89c2.tar.gz
fork-ledger-b94512e4cce884ad2df4f86e0947f610468e89c2.tar.bz2
fork-ledger-b94512e4cce884ad2df4f86e0947f610468e89c2.zip
Added several more option baseline tests
-rw-r--r--test/baseline/opt-abbrev-len.test2
-rw-r--r--test/baseline/opt-account-width.test2
-rw-r--r--test/baseline/opt-account.test2
-rw-r--r--test/baseline/opt-amount-data.test2
-rw-r--r--test/baseline/opt-amount-width.test2
-rw-r--r--test/baseline/opt-amount.test2
-rw-r--r--test/baseline/opt-anon.test2
-rw-r--r--test/baseline/opt-average.test2
-rw-r--r--test/baseline/opt-balance-format.test2
-rw-r--r--test/baseline/opt-basis.test2
-rw-r--r--test/baseline/opt-begin.test2
-rw-r--r--test/baseline/opt-by-payee.test2
-rw-r--r--test/baseline/opt-cleared.test206
-rw-r--r--test/baseline/opt-code-as-account.test34
-rw-r--r--test/baseline/opt-code-as-payee.test34
-rw-r--r--test/baseline/opt-collapse.test13
-rw-r--r--test/baseline/opt-cost.test2
-rwxr-xr-xtest/regress.py5
-rw-r--r--test/regress/1CF1EEC2.test2
-rw-r--r--test/regress/205.test2
-rw-r--r--test/regress/2E3496BD.test2
-rw-r--r--test/regress/3AB70168.test2
-rw-r--r--test/regress/55831A79.test2
-rw-r--r--test/regress/E4C9A8EA.test2
24 files changed, 309 insertions, 21 deletions
diff --git a/test/baseline/opt-abbrev-len.test b/test/baseline/opt-abbrev-len.test
index 7ef7df08..40313b22 100644
--- a/test/baseline/opt-abbrev-len.test
+++ b/test/baseline/opt-abbrev-len.test
@@ -1,4 +1,4 @@
-reg --args-only --columns=80 --abbrev-len=4
+reg --abbrev-len=4
<<<
2007/02/02 RD VMMXX
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
diff --git a/test/baseline/opt-account-width.test b/test/baseline/opt-account-width.test
index cddaae7e..b0493e87 100644
--- a/test/baseline/opt-account-width.test
+++ b/test/baseline/opt-account-width.test
@@ -1,4 +1,4 @@
-reg --args-only --columns=80 --account-width=40
+reg --account-width=40
<<<
2007/02/02 RD VMMXX
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
diff --git a/test/baseline/opt-account.test b/test/baseline/opt-account.test
index 169df120..5ac84b45 100644
--- a/test/baseline/opt-account.test
+++ b/test/baseline/opt-account.test
@@ -1,4 +1,4 @@
-bal --args-only --columns=80 --account=Master
+bal --account=Master
<<<
2007/02/02 RD VMMXX
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
diff --git a/test/baseline/opt-amount-data.test b/test/baseline/opt-amount-data.test
index b93eeeb9..0d705705 100644
--- a/test/baseline/opt-amount-data.test
+++ b/test/baseline/opt-amount-data.test
@@ -1,4 +1,4 @@
-reg --args-only --columns=80 --amount-data
+reg --amount-data
<<<
2007/02/02 RD VMMXX
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
diff --git a/test/baseline/opt-amount-width.test b/test/baseline/opt-amount-width.test
index fbdcb07b..32282214 100644
--- a/test/baseline/opt-amount-width.test
+++ b/test/baseline/opt-amount-width.test
@@ -1,4 +1,4 @@
-reg --args-only --columns=80 --amount-width=18
+reg --amount-width=18
<<<
2007/02/02 RD VMMXX
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
diff --git a/test/baseline/opt-amount.test b/test/baseline/opt-amount.test
index 2ba7d204..34f0396d 100644
--- a/test/baseline/opt-amount.test
+++ b/test/baseline/opt-amount.test
@@ -1,4 +1,4 @@
-reg --args-only --columns=80 --amount 10
+reg --amount 10
<<<
2007/02/02 RD VMMXX
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
diff --git a/test/baseline/opt-anon.test b/test/baseline/opt-anon.test
index 739bc5b7..4c387b33 100644
--- a/test/baseline/opt-anon.test
+++ b/test/baseline/opt-anon.test
@@ -1,4 +1,4 @@
-reg --columns=80 --anon
+reg --anon
<<<
2007/02/02 RD VMMXX
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
diff --git a/test/baseline/opt-average.test b/test/baseline/opt-average.test
index fc34682e..82de294d 100644
--- a/test/baseline/opt-average.test
+++ b/test/baseline/opt-average.test
@@ -1,4 +1,4 @@
-reg --args-only --columns=80 --average books
+reg --average books
<<<
2008/01/01 January
Expenses:Books $10.00
diff --git a/test/baseline/opt-balance-format.test b/test/baseline/opt-balance-format.test
index cfcf2df4..5a39ded8 100644
--- a/test/baseline/opt-balance-format.test
+++ b/test/baseline/opt-balance-format.test
@@ -1,4 +1,4 @@
-bal --args-only --balance-format='%(account)\n' --no-total
+bal --balance-format='%(account)\n' --no-total
<<<
2007/02/02 RD VMMXX
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
diff --git a/test/baseline/opt-basis.test b/test/baseline/opt-basis.test
index 2e1c13c0..f1b1242d 100644
--- a/test/baseline/opt-basis.test
+++ b/test/baseline/opt-basis.test
@@ -1,4 +1,4 @@
-bal --args-only --basis
+bal --basis
<<<
2007/02/02 RD VMMXX
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
diff --git a/test/baseline/opt-begin.test b/test/baseline/opt-begin.test
index 651f3a59..17f4012e 100644
--- a/test/baseline/opt-begin.test
+++ b/test/baseline/opt-begin.test
@@ -1,4 +1,4 @@
-reg --args-only --columns=80 --begin=2009/02
+reg --begin=2009/02
<<<
2008/01/01 January
Expenses:Books $10.00
diff --git a/test/baseline/opt-by-payee.test b/test/baseline/opt-by-payee.test
index 1f0803c8..2c70ecfb 100644
--- a/test/baseline/opt-by-payee.test
+++ b/test/baseline/opt-by-payee.test
@@ -1,4 +1,4 @@
-reg --args-only --columns=80 --by-payee not @End
+reg --by-payee not @End
<<<
2008/01/01 January
Expenses:Books $10.00
diff --git a/test/baseline/opt-cleared.test b/test/baseline/opt-cleared.test
new file mode 100644
index 00000000..8c08834c
--- /dev/null
+++ b/test/baseline/opt-cleared.test
@@ -0,0 +1,206 @@
+reg --cleared
+<<<
+2008/01/01 * January
+ Expenses:Books $10.00
+ Assets:Cash
+
+2008/01/31 End of January
+ Expenses:Books $10.00
+ Assets:Cash
+
+2008/02/01 * February
+ Expenses:Books $20.00
+ Assets:Cash
+
+2008/02/28 End of February
+ Expenses:Books $20.00
+ Assets:Cash
+
+2008/03/01 * March
+ Expenses:Books $30.00
+ Assets:Cash
+
+2008/03/31 End of March
+ Expenses:Books $30.00
+ Assets:Cash
+
+2008/04/01 April
+ * Expenses:Books $40.00
+ Assets:Cash
+
+2008/04/30 End of April
+ * Expenses:Books $40.00
+ Assets:Cash
+
+2008/05/01 May
+ Expenses:Books $50.00
+ * Assets:Cash
+
+2008/05/31 End of May
+ Expenses:Books $50.00
+ * Assets:Cash
+
+2008/06/01 June
+ Expenses:Books $60.00
+ Assets:Cash
+
+2008/06/30 End of June
+ Expenses:Books $60.00
+ Assets:Cash
+
+2008/07/01 July
+ Expenses:Books $70.00
+ Assets:Cash
+
+2008/07/31 End of July
+ Expenses:Books $70.00
+ Assets:Cash
+
+2008/08/01 August
+ Expenses:Books $80.00
+ Assets:Cash
+
+2008/08/31 End of August
+ Expenses:Books $80.00
+ Assets:Cash
+
+2008/09/01 September
+ Expenses:Books $90.00
+ Assets:Cash
+
+2008/09/30 End of September
+ Expenses:Books $90.00
+ Assets:Cash
+
+2008/10/01 October
+ Expenses:Books $100.00
+ Assets:Cash
+
+2008/10/31 End of October
+ Expenses:Books $100.00
+ Assets:Cash
+
+2008/11/01 November
+ Expenses:Books $110.00
+ Assets:Cash
+
+2008/11/30 End of November
+ Expenses:Books $110.00
+ Assets:Cash
+
+2008/12/01 December
+ Expenses:Books $120.00
+ Assets:Cash
+
+2008/12/31 End of December
+ Expenses:Books $120.00
+ Assets:Cash
+
+2009/01/01 January
+ Expenses:Books $10.00
+ Assets:Cash
+
+2009/01/31 End of January
+ Expenses:Books $10.00
+ Assets:Cash
+
+2009/02/01 February
+ Expenses:Books $20.00
+ Assets:Cash
+
+2009/02/28 End of February
+ Expenses:Books $20.00
+ Assets:Cash
+
+2009/03/01 March
+ Expenses:Books $30.00
+ Assets:Cash
+
+2009/03/31 End of March
+ Expenses:Books $30.00
+ Assets:Cash
+
+2009/04/01 April
+ Expenses:Books $40.00
+ Assets:Cash
+
+2009/04/30 End of April
+ Expenses:Books $40.00
+ Assets:Cash
+
+2009/05/01 May
+ Expenses:Books $50.00
+ Assets:Cash
+
+2009/05/31 End of May
+ Expenses:Books $50.00
+ Assets:Cash
+
+2009/06/01 June
+ Expenses:Books $60.00
+ Assets:Cash
+
+2009/06/30 End of June
+ Expenses:Books $60.00
+ Assets:Cash
+
+2009/07/01 July
+ Expenses:Books $70.00
+ Assets:Cash
+
+2009/07/31 End of July
+ Expenses:Books $70.00
+ Assets:Cash
+
+2009/08/01 August
+ Expenses:Books $80.00
+ Assets:Cash
+
+2009/08/31 End of August
+ Expenses:Books $80.00
+ Assets:Cash
+
+2009/09/01 September
+ Expenses:Books $90.00
+ Assets:Cash
+
+2009/09/30 End of September
+ Expenses:Books $90.00
+ Assets:Cash
+
+2009/10/01 October
+ Expenses:Books $100.00
+ Assets:Cash
+
+2009/10/31 End of October
+ Expenses:Books $100.00
+ Assets:Cash
+
+2009/11/01 November
+ Expenses:Books $110.00
+ Assets:Cash
+
+2009/11/30 End of November
+ Expenses:Books $110.00
+ Assets:Cash
+
+2009/12/01 December
+ Expenses:Books $120.00
+ Assets:Cash
+
+2009/12/31 End of December
+ Expenses:Books $120.00
+ Assets:Cash
+>>>1
+08-Jan-01 January Expenses:Books $10.00 $10.00
+ Assets:Cash $-10.00 0
+08-Feb-01 February Expenses:Books $20.00 $20.00
+ Assets:Cash $-20.00 0
+08-Mar-01 March Expenses:Books $30.00 $30.00
+ Assets:Cash $-30.00 0
+08-Apr-01 April Expenses:Books $40.00 $40.00
+08-Apr-30 End of April Expenses:Books $40.00 $80.00
+08-May-01 May Assets:Cash $-50.00 $30.00
+08-May-31 End of May Assets:Cash $-50.00 $-20.00
+>>>2
+=== 0
diff --git a/test/baseline/opt-code-as-account.test b/test/baseline/opt-code-as-account.test
new file mode 100644
index 00000000..c95ebd22
--- /dev/null
+++ b/test/baseline/opt-code-as-account.test
@@ -0,0 +1,34 @@
+reg --code-as-account
+<<<
+2008/01/01 * (100) January
+ Expenses:Books $10.00
+ Assets:Cash
+
+2008/01/31 (101) End of January
+ Expenses:Books $10.00
+ Assets:Cash
+
+2008/02/01 * (102) February
+ Expenses:Books $20.00
+ Assets:Cash
+
+2008/02/28 (103) End of February
+ Expenses:Books $20.00
+ Assets:Cash
+
+2008/03/01 * March
+ Expenses:Books $30.00
+ Assets:Cash
+>>>1
+08-Jan-01 January 100 $10.00 $10.00
+08-Jan-01 January 100 $-10.00 0
+08-Jan-31 End of January 101 $10.00 $10.00
+08-Jan-31 End of January 101 $-10.00 0
+08-Feb-01 February 102 $20.00 $20.00
+08-Feb-01 February 102 $-20.00 0
+08-Feb-28 End of February 103 $20.00 $20.00
+08-Feb-28 End of February 103 $-20.00 0
+08-Mar-01 March $30.00 $30.00
+08-Mar-01 March $-30.00 0
+>>>2
+=== 0
diff --git a/test/baseline/opt-code-as-payee.test b/test/baseline/opt-code-as-payee.test
new file mode 100644
index 00000000..8feafc6e
--- /dev/null
+++ b/test/baseline/opt-code-as-payee.test
@@ -0,0 +1,34 @@
+reg --code-as-payee
+<<<
+2008/01/01 * (100) January
+ Expenses:Books $10.00
+ Assets:Cash
+
+2008/01/31 (101) End of January
+ Expenses:Books $10.00
+ Assets:Cash
+
+2008/02/01 * (102) February
+ Expenses:Books $20.00
+ Assets:Cash
+
+2008/02/28 (103) End of February
+ Expenses:Books $20.00
+ Assets:Cash
+
+2008/03/01 * March
+ Expenses:Books $30.00
+ Assets:Cash
+>>>1
+08-Jan-01 100 Expenses:Books $10.00 $10.00
+08-Jan-01 100 Assets:Cash $-10.00 0
+08-Jan-31 101 Expenses:Books $10.00 $10.00
+08-Jan-31 101 Assets:Cash $-10.00 0
+08-Feb-01 102 Expenses:Books $20.00 $20.00
+08-Feb-01 102 Assets:Cash $-20.00 0
+08-Feb-28 103 Expenses:Books $20.00 $20.00
+08-Feb-28 103 Assets:Cash $-20.00 0
+08-Mar-01 Expenses:Books $30.00 $30.00
+08-Mar-01 Assets:Cash $-30.00 0
+>>>2
+=== 0
diff --git a/test/baseline/opt-collapse.test b/test/baseline/opt-collapse.test
new file mode 100644
index 00000000..6de10384
--- /dev/null
+++ b/test/baseline/opt-collapse.test
@@ -0,0 +1,13 @@
+bal --collapse
+<<<
+2007/02/02 RD VMMXX
+ Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
+ Income:Dividends:Vanguard:VMMXX $-0.35
+>>>1
+ 0.350 VMMXX Assets
+ $-0.35 Income
+--------------------
+ $-0.35
+ 0.350 VMMXX
+>>>2
+=== 0
diff --git a/test/baseline/opt-cost.test b/test/baseline/opt-cost.test
index d329c284..edf17428 100644
--- a/test/baseline/opt-cost.test
+++ b/test/baseline/opt-cost.test
@@ -1,4 +1,4 @@
-bal --args-only --cost
+bal --cost
<<<
2007/02/02 RD VMMXX
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
diff --git a/test/regress.py b/test/regress.py
index 43cdef32..7035c42b 100755
--- a/test/regress.py
+++ b/test/regress.py
@@ -40,14 +40,15 @@ def test_regression(test_file):
if command.startswith("-f - "):
use_stdin = True
- command = ("%s" % ledger) + command
+ command = ("%s" % ledger) + " --args-only --columns=80 " + command
else:
tempdata = tempfile.mkstemp()
os.write(tempdata[0], string.join(data, ''))
os.close(tempdata[0])
- command = ("%s -f \"%s\" " % (ledger, tempdata[1])) + command
+ command = (("%s -f \"%s\" " % (ledger, tempdata[1])) +
+ " --args-only --columns=80 " + command)
output = []
while line != ">>>2\n":
diff --git a/test/regress/1CF1EEC2.test b/test/regress/1CF1EEC2.test
index a22ae2b8..f97eea81 100644
--- a/test/regress/1CF1EEC2.test
+++ b/test/regress/1CF1EEC2.test
@@ -1,4 +1,4 @@
-equity --args-only assets
+equity assets
<<<
2009/01/01 sample
Assets:Super:ARF $1000.00
diff --git a/test/regress/205.test b/test/regress/205.test
index b277f496..2de1f78e 100644
--- a/test/regress/205.test
+++ b/test/regress/205.test
@@ -1,4 +1,4 @@
-bal --args-only
+bal
<<<
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
index 9458c21e..77a91a33 100644
--- a/test/regress/2E3496BD.test
+++ b/test/regress/2E3496BD.test
@@ -1,4 +1,4 @@
-bal --args-only
+bal
<<<
D 1,000.00 USD
diff --git a/test/regress/3AB70168.test b/test/regress/3AB70168.test
index ecac8a74..f82fef16 100644
--- a/test/regress/3AB70168.test
+++ b/test/regress/3AB70168.test
@@ -1,4 +1,4 @@
-bal --args-only --base
+bal --base
<<<
i 2007/03/01 23:00:00 A
o 2007/03/02 01:00:00
diff --git a/test/regress/55831A79.test b/test/regress/55831A79.test
index 30c09c3d..9ceb7782 100644
--- a/test/regress/55831A79.test
+++ b/test/regress/55831A79.test
@@ -1,4 +1,4 @@
-bal --args-only discover
+bal discover
<<<
2008/01/01 * previous balances
liabilities:credit cards:discover 4462 $-1094.38
diff --git a/test/regress/E4C9A8EA.test b/test/regress/E4C9A8EA.test
index fe2d4aab..fed47c82 100644
--- a/test/regress/E4C9A8EA.test
+++ b/test/regress/E4C9A8EA.test
@@ -1,4 +1,4 @@
-reg --args-only --columns=80
+reg
<<<
2007/12/31 * Cost basis for: RED HAT INC RHT
Assets:Investments:RBC-Broker:Account-RSP 4 RHT