Added more option baseline tests
This commit is contained in:
parent
9d9f526816
commit
8483ea16e2
6 changed files with 68 additions and 3 deletions
15
test/baseline/opt-collapse-if-zero.test
Normal file
15
test/baseline/opt-collapse-if-zero.test
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
reg --collapse-if-zero
|
||||
<<<
|
||||
2007/02/02 RD VMMXX
|
||||
Assets:Investments:Vanguard:VMMXX $0.35
|
||||
Income:Dividends:Vanguard:VMMXX $-0.35
|
||||
|
||||
2007/02/02 RD VMMXX
|
||||
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
|
||||
Income:Dividends:Vanguard:VMMXX $-0.35
|
||||
>>>1
|
||||
07-Feb-02 RD VMMXX As:In:Vanguard:VMMXX 0.350 VMMXX 0.350 VMMXX
|
||||
In:Di:Vanguard:VMMXX $-0.35 $-0.35
|
||||
0.350 VMMXX
|
||||
>>>2
|
||||
=== 0
|
||||
11
test/baseline/opt-columns.test
Normal file
11
test/baseline/opt-columns.test
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
reg --columns=100
|
||||
<<<
|
||||
2007/02/02 RD VMMXX
|
||||
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
|
||||
Income:Dividends:Vanguard:VMMXX $-0.35
|
||||
>>>1
|
||||
07-Feb-02 RD VMMXX As:Investments:Vanguard:VMMXX 0.350 VMMXX 0.350 VMMXX
|
||||
In:Dividends:Vanguard:VMMXX $-0.35 $-0.35
|
||||
0.350 VMMXX
|
||||
>>>2
|
||||
=== 0
|
||||
11
test/baseline/opt-commodity-as-account.test
Normal file
11
test/baseline/opt-commodity-as-account.test
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
reg --commodity-as-account
|
||||
<<<
|
||||
2007/02/02 RD VMMXX
|
||||
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
|
||||
Income:Dividends:Vanguard:VMMXX $-0.35
|
||||
>>>1
|
||||
07-Feb-02 RD VMMXX VMMXX 0.350 VMMXX 0.350 VMMXX
|
||||
07-Feb-02 RD VMMXX $ $-0.35 $-0.35
|
||||
0.350 VMMXX
|
||||
>>>2
|
||||
=== 0
|
||||
11
test/baseline/opt-commodity-as-payee.test
Normal file
11
test/baseline/opt-commodity-as-payee.test
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
reg --commodity-as-payee
|
||||
<<<
|
||||
2007/02/02 RD VMMXX
|
||||
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
|
||||
Income:Dividends:Vanguard:VMMXX $-0.35
|
||||
>>>1
|
||||
07-Feb-02 VMMXX As:In:Vanguard:VMMXX 0.350 VMMXX 0.350 VMMXX
|
||||
07-Feb-02 $ In:Di:Vanguard:VMMXX $-0.35 $-0.35
|
||||
0.350 VMMXX
|
||||
>>>2
|
||||
=== 0
|
||||
10
test/baseline/opt-csv-format.test
Normal file
10
test/baseline/opt-csv-format.test
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
csv --csv-format='"%(date)"\n'
|
||||
<<<
|
||||
2007/02/02 RD VMMXX
|
||||
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
|
||||
Income:Dividends:Vanguard:VMMXX $-0.35
|
||||
>>>1
|
||||
"07-Feb-02"
|
||||
"07-Feb-02"
|
||||
>>>2
|
||||
=== 0
|
||||
|
|
@ -40,6 +40,9 @@ def test_regression(test_file):
|
|||
if command.startswith("-f - "):
|
||||
use_stdin = True
|
||||
|
||||
if re.search('--columns', command):
|
||||
command = ("%s" % ledger) + " --args-only " + command
|
||||
else:
|
||||
command = ("%s" % ledger) + " --args-only --columns=80 " + command
|
||||
else:
|
||||
tempdata = tempfile.mkstemp()
|
||||
|
|
@ -47,6 +50,10 @@ def test_regression(test_file):
|
|||
os.write(tempdata[0], string.join(data, ''))
|
||||
os.close(tempdata[0])
|
||||
|
||||
if re.search('--columns', command):
|
||||
command = (("%s -f \"%s\" " % (ledger, tempdata[1])) +
|
||||
" --args-only " + command)
|
||||
else:
|
||||
command = (("%s -f \"%s\" " % (ledger, tempdata[1])) +
|
||||
" --args-only --columns=80 " + command)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue