convert functional tests to shelltestrunner 0.8 format

This commit is contained in:
Simon Michael 2010-04-10 00:11:47 +00:00
parent 298d192678
commit 7a895b0133
48 changed files with 53 additions and 53 deletions

View File

@ -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

View File

@ -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 .*/

View File

@ -1,4 +1,4 @@
-f nosuch.ledger add
./hledger -f nosuch.ledger add
<<<
>>>2 /date .*: description/

View File

@ -1,4 +1,4 @@
-f nosuch.ledger add
./hledger -f nosuch.ledger add
<<<

View File

@ -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

View File

@ -1,5 +1,5 @@
# again, complain like ledger, but we could handle this
-f - print
./hledger -f - print
<<<
2009/1/1 x
a 1

View File

@ -1,4 +1,4 @@
-f - print
./hledger -f - print
<<<
2009/01/01 x
a 1

View File

@ -1,4 +1,4 @@
-f - print
./hledger -f - print
<<<
2009/01/01 x
; comment line within postings

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -1,4 +1,4 @@
-f - balance -p 'in 2009' --effective
./hledger -f - balance -p 'in 2009' --effective
<<<
2009/1/1 x
a 1

View File

@ -1,5 +1,5 @@
#
-f - print --effective
./hledger -f - print --effective
<<<
2009/1/1=1/2 x
a 1

View File

@ -1,4 +1,4 @@
-f - print
./hledger -f - print
<<<
2009/1/1=2010/1/1 x
a 1

View File

@ -1,4 +1,4 @@
-f - print --effective
./hledger -f - print --effective
<<<
2009/1/1=2010/1/1 x
a 1

View File

@ -1,4 +1,4 @@
-f - register --effective
./hledger -f - register --effective
<<<
2009/1/1=2010/1/1 x
a 1

View File

@ -1,4 +1,4 @@
-f - balance
./hledger -f - balance
<<<
2009/1/1 x
aaaaaaaaaaaaaaaaaaaa:aaaaaaaaaaaaaaaaaaaa:aaaaaaaaaaaaaaaaaaaa €1

View File

@ -1,4 +1,4 @@
print
./hledger -f- print
<<<
2009/1/1 x
aaaaaaaaaaaaaaaaaaaa:aaaaaaaaaaaaaaaaaaaa:aaaaaaaaaaaaaaaaaaaa €1

View File

@ -1,4 +1,4 @@
register
./hledger -f- register
<<<
2009/1/1 x aaaaaaaaaaaaaaaaaaaa:aaaaaaaaaaaaaaaaaaaa:aaaaaaaaaaaaaaaaaaaa €1
b

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,4 +1,4 @@
-f - balance -E
./hledger -f - balance -E
<<<
2009/1/1 x
a: 13

View File

@ -1,4 +1,4 @@
-f - print
./hledger -f - print
<<<
2009-01-01 x
a 2

View File

@ -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

View File

@ -1,4 +1,4 @@
-f-
./hledger -f-
<<<
; -*- ledger -*-

View File

@ -1,4 +1,4 @@
-f - print
./hledger -f - print
<<<
P 2009/1/1 p 0.5h

View File

@ -1,4 +1,4 @@
-f - print
./hledger -f - print
<<<
2009/1/1 x
aaaaabbbbbcccccdddddeeeeefffffggggghhhhh 1

View File

@ -1,5 +1,5 @@
# a posting comment should appear in print
-f - print
./hledger -f - print
<<<
2010/01/01 x
a 1 ; comment

View File

@ -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

View File

@ -1,4 +1,4 @@
-f - register --depth 1 --empty --monthly
./hledger -f - register --depth 1 --empty --monthly
<<<
2010/1/1 x
a:aa 1

View File

@ -1,4 +1,4 @@
-f - register --depth 1
./hledger -f - register --depth 1
<<<
2010/1/1 x
a:aa 1

View File

@ -1,5 +1,5 @@
# a posting comment should not appear in register
-f - register
./hledger -f - register
<<<
2010/1/1 x
a 1 ; comment

View File

@ -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

View File

@ -1,4 +1,4 @@
-f sample.ledger balance --depth 1
./hledger -f sample.ledger balance --depth 1
>>>
$-1 assets
$2 expenses

View File

@ -1,4 +1,4 @@
-f sample.ledger balance o
./hledger -f sample.ledger balance o
>>>
$1 expenses:food
$-2 income

View File

@ -1,4 +1,4 @@
-f sample.ledger balance
./hledger -f sample.ledger balance
>>>
$-1 assets
$1 bank:saving

View File

@ -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

View File

@ -1,4 +1,4 @@
-f - print
./hledger -f - print
<<<
i 2009/1/1 08:00:00 x
o 2009/1/1 09:00:00

View File

@ -1,4 +1,4 @@
-f - register
./hledger -f - register
<<<
2009/1/1 a
b 1.1

View File

@ -1,4 +1,4 @@
-f - register τράπ
./hledger -f - register τράπ
<<<
2009-01-01 проверка
τράπεζα 10 руб

View File

@ -1,4 +1,4 @@
-f - balance
./hledger -f - balance
<<<
2009-01-01 проверка
τράπεζα 10 руб

View File

@ -1,4 +1,4 @@
-f - register desc:аура
./hledger -f - register desc:аура
<<<
2009-01-01 аура (cyrillic letters)
bank 10

View File

@ -1,4 +1,4 @@
-f - balance
./hledger -f - balance
<<<
2009-01-01 broken entry
дебит 1

View File

@ -1,4 +1,4 @@
-f - print
./hledger -f - print
<<<
2009-01-01 проверка
счёт:первый 1

View File

@ -1,4 +1,4 @@
-f - register
./hledger -f - register
<<<
2009-01-01 проверка
τράπεζα 10 руб

View File

@ -1,4 +1,4 @@
-f - print
./hledger -f - print
<<<
2009/1/1 x
(virtual) 100

View File

@ -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