From 7a895b0133ba88224e237dfcb58bb9e2304b3592 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sat, 10 Apr 2010 00:11:47 +0000 Subject: [PATCH] convert functional tests to shelltestrunner 0.8 format --- Makefile | 2 +- tests/add-bad-date-fails.test | 2 +- tests/add-blank-date.test | 2 +- tests/add-blank-description-fails.test | 2 +- tests/add-default-amount-precision.test | 2 +- tests/amountless-virtual-postings.test | 2 +- tests/comment-line-after-postings.test | 2 +- tests/commented-posting.test | 2 +- tests/commodities.test | 4 ++-- tests/commodityless-amount-with-price.test | 2 +- tests/decimals-balance-failure.test | 2 +- tests/effective-balance.test | 2 +- tests/effective-date.test | 2 +- tests/effective-print-2.test | 2 +- tests/effective-print.test | 2 +- tests/effective-register.test | 2 +- tests/eliding-balance.test | 2 +- tests/eliding-print.test.notimplemented | 2 +- tests/eliding-register.test.notimplemented | 2 +- tests/extra-date-slash.test | 2 +- tests/filter-patterns.test | 4 ++-- tests/missing-real-and-virtual-amt.test | 2 +- tests/null-accountname-component.test | 2 +- tests/parens-in-account-name.test | 2 +- tests/parse-dates.test | 2 +- tests/parse-ledger-sample.test | 2 +- tests/price-history.test | 2 +- tests/print-long-account.test | 2 +- tests/print-posting-comment.test | 2 +- tests/print-preserves-comments.test | 2 +- tests/register-depth-empty.test | 2 +- tests/register-depth.test | 2 +- tests/register-posting-comment.test | 2 +- tests/reporting-intervals.test | 8 ++++---- tests/sample-balance-depth.test | 2 +- tests/sample-balance-o.test | 2 +- tests/sample-balance.test | 2 +- tests/set-price-to-balance.test.unimplemented | 2 +- tests/timelog.test | 2 +- tests/unbalanced.test | 2 +- tests/unicode-account-matching.test | 2 +- tests/unicode-balance.test | 2 +- tests/unicode-description-matching.test | 2 +- tests/unicode-error-message.test | 2 +- tests/unicode-print.test | 2 +- tests/unicode-register.test | 2 +- tests/virtual.test | 2 +- tests/zero-handling.test | 2 +- 48 files changed, 53 insertions(+), 53 deletions(-) diff --git a/Makefile b/Makefile index 8007c2cd1..96f35ec9e 100644 --- a/Makefile +++ b/Makefile @@ -146,7 +146,7 @@ unittesths: # run functional tests, requires shelltestrunner from hackage functest: hledger - @(shelltestrunner ./hledger tests/*.test --implicit=none --threads=16 \ + (shelltest tests --implicit=none --threads=16 \ && echo $@ passed) || echo $@ FAILED # run doc tests diff --git a/tests/add-bad-date-fails.test b/tests/add-bad-date-fails.test index ccf56ef51..eb57d3280 100644 --- a/tests/add-bad-date-fails.test +++ b/tests/add-bad-date-fails.test @@ -1,5 +1,5 @@ # add should prompt again when it gets a bad date --f nosuch.ledger add +./hledger -f nosuch.ledger add <<< 2009/1/32 >>>2 /date .*: date .*/ diff --git a/tests/add-blank-date.test b/tests/add-blank-date.test index 924ee62ab..f6b345fe5 100644 --- a/tests/add-blank-date.test +++ b/tests/add-blank-date.test @@ -1,4 +1,4 @@ --f nosuch.ledger add +./hledger -f nosuch.ledger add <<< >>>2 /date .*: description/ diff --git a/tests/add-blank-description-fails.test b/tests/add-blank-description-fails.test index ef7332066..23bc7982b 100644 --- a/tests/add-blank-description-fails.test +++ b/tests/add-blank-description-fails.test @@ -1,4 +1,4 @@ --f nosuch.ledger add +./hledger -f nosuch.ledger add <<< diff --git a/tests/add-default-amount-precision.test b/tests/add-default-amount-precision.test index b5ae429d8..daf19d583 100644 --- a/tests/add-default-amount-precision.test +++ b/tests/add-default-amount-precision.test @@ -1,5 +1,5 @@ # add's default amounts should not fail to balance due to precision --f nosuch.ledger add +./hledger -f nosuch.ledger add <<< 2010/1/1 x diff --git a/tests/amountless-virtual-postings.test b/tests/amountless-virtual-postings.test index 165673159..0559ffd09 100644 --- a/tests/amountless-virtual-postings.test +++ b/tests/amountless-virtual-postings.test @@ -1,5 +1,5 @@ # again, complain like ledger, but we could handle this --f - print +./hledger -f - print <<< 2009/1/1 x a 1 diff --git a/tests/comment-line-after-postings.test b/tests/comment-line-after-postings.test index 974260cd1..0667f4900 100644 --- a/tests/comment-line-after-postings.test +++ b/tests/comment-line-after-postings.test @@ -1,4 +1,4 @@ --f - print +./hledger -f - print <<< 2009/01/01 x a 1 diff --git a/tests/commented-posting.test b/tests/commented-posting.test index 8b834fe98..cbb73d1be 100644 --- a/tests/commented-posting.test +++ b/tests/commented-posting.test @@ -1,4 +1,4 @@ --f - print +./hledger -f - print <<< 2009/01/01 x ; comment line within postings diff --git a/tests/commodities.test b/tests/commodities.test index 89eb4fbd6..25f10e0f1 100644 --- a/tests/commodities.test +++ b/tests/commodities.test @@ -1,6 +1,6 @@ # a commodity may contain/end with numbers, if double quoted # 1. without quotes, fail. XXX parse error should be clearer here --f- print +./hledger -f- print <<< 2010-04-05 x a 10 DE0002635307 @@ -10,7 +10,7 @@ unexpected "0" expecting comment or new-line/ >>>= 1 # 2. with quotes --f- print +./hledger -f- print <<< 2010-04-05 x a 10 "DE0002635307" diff --git a/tests/commodityless-amount-with-price.test b/tests/commodityless-amount-with-price.test index 158290d04..4bd4e6942 100644 --- a/tests/commodityless-amount-with-price.test +++ b/tests/commodityless-amount-with-price.test @@ -1,5 +1,5 @@ # a no-commodity amount with a price should work --f - print +./hledger -f - print <<< 2010/1/1 x a 1 @ $2 diff --git a/tests/decimals-balance-failure.test b/tests/decimals-balance-failure.test index 3a5b7828d..1f93e2cef 100644 --- a/tests/decimals-balance-failure.test +++ b/tests/decimals-balance-failure.test @@ -1,5 +1,5 @@ # b amount with no decimal places, in middle, causes balance failure (0.6.1) --f - print +./hledger -f - print <<< 2009/1/1 x a $1.25 diff --git a/tests/effective-balance.test b/tests/effective-balance.test index 6ab895182..3176f3df9 100644 --- a/tests/effective-balance.test +++ b/tests/effective-balance.test @@ -1,4 +1,4 @@ --f - balance -p 'in 2009' --effective +./hledger -f - balance -p 'in 2009' --effective <<< 2009/1/1 x a 1 diff --git a/tests/effective-date.test b/tests/effective-date.test index 91134b263..df7ad85d5 100644 --- a/tests/effective-date.test +++ b/tests/effective-date.test @@ -1,5 +1,5 @@ # --f - print --effective +./hledger -f - print --effective <<< 2009/1/1=1/2 x a 1 diff --git a/tests/effective-print-2.test b/tests/effective-print-2.test index dc20741e3..6f5f2da2b 100644 --- a/tests/effective-print-2.test +++ b/tests/effective-print-2.test @@ -1,4 +1,4 @@ --f - print +./hledger -f - print <<< 2009/1/1=2010/1/1 x a 1 diff --git a/tests/effective-print.test b/tests/effective-print.test index c188bdbf3..01ed36e6e 100644 --- a/tests/effective-print.test +++ b/tests/effective-print.test @@ -1,4 +1,4 @@ --f - print --effective +./hledger -f - print --effective <<< 2009/1/1=2010/1/1 x a 1 diff --git a/tests/effective-register.test b/tests/effective-register.test index a339e8c9c..6eb0d13e2 100644 --- a/tests/effective-register.test +++ b/tests/effective-register.test @@ -1,4 +1,4 @@ --f - register --effective +./hledger -f - register --effective <<< 2009/1/1=2010/1/1 x a 1 diff --git a/tests/eliding-balance.test b/tests/eliding-balance.test index d63adacf1..f12bd50f0 100644 --- a/tests/eliding-balance.test +++ b/tests/eliding-balance.test @@ -1,4 +1,4 @@ --f - balance +./hledger -f - balance <<< 2009/1/1 x aaaaaaaaaaaaaaaaaaaa:aaaaaaaaaaaaaaaaaaaa:aaaaaaaaaaaaaaaaaaaa €1 diff --git a/tests/eliding-print.test.notimplemented b/tests/eliding-print.test.notimplemented index ee41a7d0c..ab8dab2b6 100644 --- a/tests/eliding-print.test.notimplemented +++ b/tests/eliding-print.test.notimplemented @@ -1,4 +1,4 @@ -print +./hledger -f- print <<< 2009/1/1 x aaaaaaaaaaaaaaaaaaaa:aaaaaaaaaaaaaaaaaaaa:aaaaaaaaaaaaaaaaaaaa €1 diff --git a/tests/eliding-register.test.notimplemented b/tests/eliding-register.test.notimplemented index e5efc3a75..477a9339a 100644 --- a/tests/eliding-register.test.notimplemented +++ b/tests/eliding-register.test.notimplemented @@ -1,4 +1,4 @@ -register +./hledger -f- register <<< 2009/1/1 x aaaaaaaaaaaaaaaaaaaa:aaaaaaaaaaaaaaaaaaaa:aaaaaaaaaaaaaaaaaaaa €1 b diff --git a/tests/extra-date-slash.test b/tests/extra-date-slash.test index 69be6b5ba..a5c1d6f21 100644 --- a/tests/extra-date-slash.test +++ b/tests/extra-date-slash.test @@ -1,5 +1,5 @@ # an extra slash before [ silently disables the effective date in 0.6.1 --f - print --effective -p 2009/1/2 +./hledger -f - print --effective -p 2009/1/2 <<< 2009/1/1/[=2009/1/2] x a 1 diff --git a/tests/filter-patterns.test b/tests/filter-patterns.test index 8071af826..f44375251 100644 --- a/tests/filter-patterns.test +++ b/tests/filter-patterns.test @@ -1,5 +1,5 @@ # 1. account pattern with space --f- register 'a a' +./hledger -f- register 'a a' <<< 2010/3/1 x a a 1 @@ -8,7 +8,7 @@ 2010/03/01 x a a 1 1 # # 2. description pattern with space --f- register desc:'x x' +./hledger -f- register desc:'x x' <<< 2010/3/1 x a 1 diff --git a/tests/missing-real-and-virtual-amt.test b/tests/missing-real-and-virtual-amt.test index e298f0454..e83127ea1 100644 --- a/tests/missing-real-and-virtual-amt.test +++ b/tests/missing-real-and-virtual-amt.test @@ -1,5 +1,5 @@ # could balance this, but complain instead like ledger --f - register +./hledger -f - register <<< 2009/6/24 carwash equity:draw:personal:transportation:car:carwash $3.50 diff --git a/tests/null-accountname-component.test b/tests/null-accountname-component.test index b6343ca2f..71f3702e0 100644 --- a/tests/null-accountname-component.test +++ b/tests/null-accountname-component.test @@ -1,4 +1,4 @@ --f - balance -E +./hledger -f - balance -E <<< 2009/1/1 x a: 13 diff --git a/tests/parens-in-account-name.test b/tests/parens-in-account-name.test index 5f71abf2b..0cd2cad47 100644 --- a/tests/parens-in-account-name.test +++ b/tests/parens-in-account-name.test @@ -1,4 +1,4 @@ --f - print +./hledger -f - print <<< 2009-01-01 x a 2 diff --git a/tests/parse-dates.test b/tests/parse-dates.test index 59dc4b6f4..2243f7841 100644 --- a/tests/parse-dates.test +++ b/tests/parse-dates.test @@ -1,5 +1,5 @@ # dates with bad month or day numbers should be rejected --f- print +./hledger -f- print <<< 2010/31/12 x a 1 diff --git a/tests/parse-ledger-sample.test b/tests/parse-ledger-sample.test index d8a9a4808..3f6f56341 100644 --- a/tests/parse-ledger-sample.test +++ b/tests/parse-ledger-sample.test @@ -1,4 +1,4 @@ --f- +./hledger -f- <<< ; -*- ledger -*- diff --git a/tests/price-history.test b/tests/price-history.test index a62cffd4f..c74e5ae1c 100644 --- a/tests/price-history.test +++ b/tests/price-history.test @@ -1,4 +1,4 @@ --f - print +./hledger -f - print <<< P 2009/1/1 p 0.5h diff --git a/tests/print-long-account.test b/tests/print-long-account.test index e1dd1b0c9..6b6466afa 100644 --- a/tests/print-long-account.test +++ b/tests/print-long-account.test @@ -1,4 +1,4 @@ --f - print +./hledger -f - print <<< 2009/1/1 x aaaaabbbbbcccccdddddeeeeefffffggggghhhhh 1 diff --git a/tests/print-posting-comment.test b/tests/print-posting-comment.test index 38217efe2..5d3132676 100644 --- a/tests/print-posting-comment.test +++ b/tests/print-posting-comment.test @@ -1,5 +1,5 @@ # a posting comment should appear in print --f - print +./hledger -f - print <<< 2010/01/01 x a 1 ; comment diff --git a/tests/print-preserves-comments.test b/tests/print-preserves-comments.test index 7d0a16bae..11e901b62 100644 --- a/tests/print-preserves-comments.test +++ b/tests/print-preserves-comments.test @@ -1,6 +1,6 @@ # let's have print preserve comments as far as possible # we preserve line-end comments but not full line comments --f - print +./hledger -f - print <<< 2009/1/1 x ; description comment a 1 ; amount comment diff --git a/tests/register-depth-empty.test b/tests/register-depth-empty.test index 2a45124ac..5b012add2 100644 --- a/tests/register-depth-empty.test +++ b/tests/register-depth-empty.test @@ -1,4 +1,4 @@ --f - register --depth 1 --empty --monthly +./hledger -f - register --depth 1 --empty --monthly <<< 2010/1/1 x a:aa 1 diff --git a/tests/register-depth.test b/tests/register-depth.test index 866d1ad0b..d663ad8b6 100644 --- a/tests/register-depth.test +++ b/tests/register-depth.test @@ -1,4 +1,4 @@ --f - register --depth 1 +./hledger -f - register --depth 1 <<< 2010/1/1 x a:aa 1 diff --git a/tests/register-posting-comment.test b/tests/register-posting-comment.test index 2903646f0..7c3e9a9cb 100644 --- a/tests/register-posting-comment.test +++ b/tests/register-posting-comment.test @@ -1,5 +1,5 @@ # a posting comment should not appear in register --f - register +./hledger -f - register <<< 2010/1/1 x a 1 ; comment diff --git a/tests/reporting-intervals.test b/tests/reporting-intervals.test index 01d080db5..74afb7794 100644 --- a/tests/reporting-intervals.test +++ b/tests/reporting-intervals.test @@ -1,6 +1,6 @@ # # monthly reporting interval, no end dates, shows just the intervals with data: --f- register --period 'monthly' +./hledger -f- register --period 'monthly' <<< 2010/2/1 x a 1 @@ -10,7 +10,7 @@ b -1 0 # # with --empty, the same: --f- register --period 'monthly' --empty +./hledger -f- register --period 'monthly' --empty <<< 2010/2/1 x a 1 @@ -20,7 +20,7 @@ b -1 0 # # with --empty and start/end dates, show all intervals covering the specified period --f- register --period 'monthly from 2010/1/10 to 2010/3/15' --empty +./hledger -f- register --period 'monthly from 2010/1/10 to 2010/3/15' --empty <<< 2010/2/1 x a 1 @@ -32,7 +32,7 @@ 2010/03/01 - 2010/03/31 0 0 # # with just one start/end date, get the other from the data --f- register --period 'monthly from 2010/1/10' --empty +./hledger -f- register --period 'monthly from 2010/1/10' --empty <<< 2010/2/1 x a 1 diff --git a/tests/sample-balance-depth.test b/tests/sample-balance-depth.test index 8db6da1b4..fa459e0ab 100644 --- a/tests/sample-balance-depth.test +++ b/tests/sample-balance-depth.test @@ -1,4 +1,4 @@ --f sample.ledger balance --depth 1 +./hledger -f sample.ledger balance --depth 1 >>> $-1 assets $2 expenses diff --git a/tests/sample-balance-o.test b/tests/sample-balance-o.test index 7164ec241..10a44542c 100644 --- a/tests/sample-balance-o.test +++ b/tests/sample-balance-o.test @@ -1,4 +1,4 @@ --f sample.ledger balance o +./hledger -f sample.ledger balance o >>> $1 expenses:food $-2 income diff --git a/tests/sample-balance.test b/tests/sample-balance.test index 55ed5bb34..b259c9868 100644 --- a/tests/sample-balance.test +++ b/tests/sample-balance.test @@ -1,4 +1,4 @@ --f sample.ledger balance +./hledger -f sample.ledger balance >>> $-1 assets $1 bank:saving diff --git a/tests/set-price-to-balance.test.unimplemented b/tests/set-price-to-balance.test.unimplemented index 6126f76ad..af990c0d9 100644 --- a/tests/set-price-to-balance.test.unimplemented +++ b/tests/set-price-to-balance.test.unimplemented @@ -1,5 +1,5 @@ # should infer prices to balance this - not implemented --f - print +./hledger -f - print <<< 2009/1/1 opening balance Assets:Brokerage 1 AAPL diff --git a/tests/timelog.test b/tests/timelog.test index f2739cad1..d677e41a4 100644 --- a/tests/timelog.test +++ b/tests/timelog.test @@ -1,4 +1,4 @@ --f - print +./hledger -f - print <<< i 2009/1/1 08:00:00 x o 2009/1/1 09:00:00 diff --git a/tests/unbalanced.test b/tests/unbalanced.test index 84084a821..bdc00cfb9 100644 --- a/tests/unbalanced.test +++ b/tests/unbalanced.test @@ -1,4 +1,4 @@ --f - register +./hledger -f - register <<< 2009/1/1 a b 1.1 diff --git a/tests/unicode-account-matching.test b/tests/unicode-account-matching.test index 70f28fcdb..f4c310382 100644 --- a/tests/unicode-account-matching.test +++ b/tests/unicode-account-matching.test @@ -1,4 +1,4 @@ --f - register τράπ +./hledger -f - register τράπ <<< 2009-01-01 проверка τράπεζα 10 руб diff --git a/tests/unicode-balance.test b/tests/unicode-balance.test index afe0b0bd5..e1469f3fc 100644 --- a/tests/unicode-balance.test +++ b/tests/unicode-balance.test @@ -1,4 +1,4 @@ --f - balance +./hledger -f - balance <<< 2009-01-01 проверка τράπεζα 10 руб diff --git a/tests/unicode-description-matching.test b/tests/unicode-description-matching.test index 730b77d02..666bcf60d 100644 --- a/tests/unicode-description-matching.test +++ b/tests/unicode-description-matching.test @@ -1,4 +1,4 @@ --f - register desc:аура +./hledger -f - register desc:аура <<< 2009-01-01 аура (cyrillic letters) bank 10 diff --git a/tests/unicode-error-message.test b/tests/unicode-error-message.test index 48a4fdad8..2c8463435 100644 --- a/tests/unicode-error-message.test +++ b/tests/unicode-error-message.test @@ -1,4 +1,4 @@ --f - balance +./hledger -f - balance <<< 2009-01-01 broken entry дебит 1 diff --git a/tests/unicode-print.test b/tests/unicode-print.test index ca1c7d816..4f7519aab 100644 --- a/tests/unicode-print.test +++ b/tests/unicode-print.test @@ -1,4 +1,4 @@ --f - print +./hledger -f - print <<< 2009-01-01 проверка счёт:первый 1 diff --git a/tests/unicode-register.test b/tests/unicode-register.test index a2d2ec55b..bb2585010 100644 --- a/tests/unicode-register.test +++ b/tests/unicode-register.test @@ -1,4 +1,4 @@ --f - register +./hledger -f - register <<< 2009-01-01 проверка τράπεζα 10 руб diff --git a/tests/virtual.test b/tests/virtual.test index 206772bbe..3b9203634 100644 --- a/tests/virtual.test +++ b/tests/virtual.test @@ -1,4 +1,4 @@ --f - print +./hledger -f - print <<< 2009/1/1 x (virtual) 100 diff --git a/tests/zero-handling.test b/tests/zero-handling.test index db9932655..1baad6749 100644 --- a/tests/zero-handling.test +++ b/tests/zero-handling.test @@ -1,6 +1,6 @@ # a zero amount is always displayed as just "0", regardless of any commodity/decimal places/price (like ledger) # --f- print --empty +./hledger -f- print --empty <<< 2010/3/1 x a $0.00 @ 3EUR