diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-20 18:36:47 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-20 18:36:47 -0400 |
commit | 8483ea16e23eefd3281774c142c7117a8a87c245 (patch) | |
tree | b5adbc4d2c118cb84e760815ea714b291cb27407 /test | |
parent | 9d9f526816121d793de9a37d7b3e4ce7ca163953 (diff) | |
download | fork-ledger-8483ea16e23eefd3281774c142c7117a8a87c245.tar.gz fork-ledger-8483ea16e23eefd3281774c142c7117a8a87c245.tar.bz2 fork-ledger-8483ea16e23eefd3281774c142c7117a8a87c245.zip |
Added more option baseline tests
Diffstat (limited to 'test')
-rw-r--r-- | test/baseline/opt-collapse-if-zero.test | 15 | ||||
-rw-r--r-- | test/baseline/opt-columns.test | 11 | ||||
-rw-r--r-- | test/baseline/opt-commodity-as-account.test | 11 | ||||
-rw-r--r-- | test/baseline/opt-commodity-as-payee.test | 11 | ||||
-rw-r--r-- | test/baseline/opt-csv-format.test | 10 | ||||
-rwxr-xr-x | test/regress.py | 13 |
6 files changed, 68 insertions, 3 deletions
diff --git a/test/baseline/opt-collapse-if-zero.test b/test/baseline/opt-collapse-if-zero.test new file mode 100644 index 00000000..fb4d33fd --- /dev/null +++ b/test/baseline/opt-collapse-if-zero.test @@ -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 diff --git a/test/baseline/opt-columns.test b/test/baseline/opt-columns.test new file mode 100644 index 00000000..4dc28d9b --- /dev/null +++ b/test/baseline/opt-columns.test @@ -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 diff --git a/test/baseline/opt-commodity-as-account.test b/test/baseline/opt-commodity-as-account.test new file mode 100644 index 00000000..6dcf8ace --- /dev/null +++ b/test/baseline/opt-commodity-as-account.test @@ -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 diff --git a/test/baseline/opt-commodity-as-payee.test b/test/baseline/opt-commodity-as-payee.test new file mode 100644 index 00000000..9872a15c --- /dev/null +++ b/test/baseline/opt-commodity-as-payee.test @@ -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 diff --git a/test/baseline/opt-csv-format.test b/test/baseline/opt-csv-format.test new file mode 100644 index 00000000..7efefc0d --- /dev/null +++ b/test/baseline/opt-csv-format.test @@ -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 diff --git a/test/regress.py b/test/regress.py index 7035c42b..745c9d5f 100755 --- a/test/regress.py +++ b/test/regress.py @@ -40,15 +40,22 @@ def test_regression(test_file): if command.startswith("-f - "): use_stdin = True - command = ("%s" % ledger) + " --args-only --columns=80 " + command + if re.search('--columns', command): + command = ("%s" % ledger) + " --args-only " + command + else: + 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])) + - " --args-only --columns=80 " + command) + 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) output = [] while line != ">>>2\n": |