update shell tests for latest shelltestrunner

This commit is contained in:
Simon Michael 2011-03-12 20:55:49 +00:00
parent e2c38d59d7
commit ef0f054230
11 changed files with 63 additions and 3 deletions

View File

@ -13,6 +13,8 @@ bin/hledger -f - print
EUR -1
c USD -1 ; a euro and a dollar
>>>=0
# 2. register
bin/hledger -f - register
<<<
@ -26,6 +28,8 @@ bin/hledger -f - register
b USD 1 USD 1
EUR -1
c USD -1 0
>>>=0
# 3. balance
bin/hledger -f - balance
<<<
@ -40,6 +44,8 @@ bin/hledger -f - balance
USD -1 c
--------------------
EUR 0
>>>=0
# 4. mixed amounts with prices
# XXX
# bin/hledger -f - print
@ -61,6 +67,8 @@ bin/hledger -f - balance
# b USD 1.0 ; a dollar
# c USD -2.1 ; a euro and a dollar
#
#>>>=0
#
# #
# bin/hledger -f - register
# <<<
@ -74,6 +82,8 @@ bin/hledger -f - balance
# b USD 1.0 USD 1.0
# EUR 1
# c USD -2.1 USD -1.1
#>>>=0
#
# #
# bin/hledger -f - balance
# <<<

View File

@ -22,6 +22,8 @@ bin/hledger -f- print --cleared
a 1
b -1
>>>=0
# report uncleared transactions only
bin/hledger -f- print --uncleared
<<<
@ -41,6 +43,8 @@ bin/hledger -f- print --uncleared
a 1
b -1
>>>=0
# we don't yet support cleared postings, except we should ignore the marker when parsing them
bin/hledger -f- balance --no-total
<<<
@ -53,3 +57,4 @@ bin/hledger -f- balance --no-total
>>>
7 a
-7 b
>>>=0

View File

@ -18,6 +18,8 @@ bin/hledger -f- print
a 10 "DE0002635307"
b -10 "DE0002635307"
>>>=0
# 3. and in other reports too, I guess
bin/hledger -f- balance
<<<
@ -29,3 +31,4 @@ bin/hledger -f- balance
-10 "DE0002635307" b
--------------------
0 "DE0002635307"
>>>=0

View File

@ -6,6 +6,8 @@ bin/hledger -f- register 'a a'
b
>>>
2010/03/01 x a a 1 1
>>>=0
#
# 2. description pattern with space
bin/hledger -f- register desc:'x x'
@ -20,3 +22,4 @@ bin/hledger -f- register desc:'x x'
>>>
2010/03/02 x x a 1 1
b -1 0
>>>=0

View File

@ -4,9 +4,14 @@ bin/hledger -f-
2010/1/1
a 1
b
>>>=0
# 2. same, but no separator space after the date
bin/hledger -f-
<<<
2010/1/1
a 1
b
>>>=0

View File

@ -14,6 +14,8 @@ bin/hledger -f - print --cost
a $1.00
a $-1.00
>>>=0
# 2. and here the price should be printed with its original precision, not
# the canonical display precision
bin/hledger -f - print
@ -28,6 +30,8 @@ bin/hledger -f - print
a 1C @ $1.0049
a -1C @ $1.0049
>>>=0
# 3. with $'s display precision at 3 or more, this txn should not balance.
# The error message shows the difference with full precision.
bin/hledger -f - balance --no-total --cost --empty
@ -37,6 +41,7 @@ bin/hledger -f - balance --no-total --cost --empty
a $-1.000
>>>2 /off by \$0.0049/
>>>= 1
# 4. with $'s display precision at 2 or less, this txn should balance
bin/hledger -f - balance --no-total --cost --empty
<<<
@ -45,6 +50,8 @@ bin/hledger -f - balance --no-total --cost --empty
a $-1.00
>>>
$0.00 a
>>>=0
# 5. avamk's 2011/1/19 example
bin/hledger -f - -B bal
<<<

View File

@ -10,6 +10,8 @@ bin/hledger -f- print
expenses:foreign currency €100 @ $1.35
assets €-100 @ $1.35
>>>=0
# 2. convert to cost basis
bin/hledger -f- print -B
<<<
@ -21,6 +23,8 @@ bin/hledger -f- print -B
expenses:foreign currency $135.00
assets $-135.00
>>>=0
# 3. with a historical price directive
bin/hledger -f- print -B
<<<
@ -37,6 +41,8 @@ P 2011/01/02 € $1.36
expenses:foreign currency $135.00
assets $-135.00
>>>=0
# 4. with a total price
bin/hledger -f - print
<<<
@ -48,6 +54,8 @@ bin/hledger -f - print
expenses:foreign currency €100 @@ $135
assets €-100 @@ $135
>>>=0
# 5. when the balance has exactly two commodities, both unpriced, infer an
# implicit conversion price for the first one in terms of the second.
bin/hledger -f - print
@ -68,6 +76,8 @@ bin/hledger -f - print
misc €-1 @ $1.35
misc $-2.10
>>>=0
# # 6. when the *cost-basis* balance has exactly two commodities, both
# # unpriced, infer an implicit conversion price for the first one in terms
# # of the second.
@ -100,6 +110,8 @@ bin/hledger -f - print
c56a21d23a6535184e7152ee138c28974f14280c 866.231000 GGGGG @@ $17,783.72
a35e82730cf91569c302b313780e5895f75a62b9 $-17,783.72
>>>=0
# 8. when the balance has more than two commodities, don't bother
bin/hledger -f - print
<<<
@ -121,3 +133,4 @@ bin/hledger -f - balance -B
$135 expenses:foreign currency
--------------------
$0
>>>=0

View File

@ -7,7 +7,8 @@ bin/hledger -f - register aa --depth 1
>>>
2010/01/01 x a 1 1
>>>2
>>>=0
# this matches the second-level account, displays the second-level name, does not aggregate transactions
bin/hledger -f - register aa --depth 2
<<<
@ -27,7 +28,8 @@ bin/hledger -f - register aa --depth 2
2010/01/01 x a:aa 1 1
2010/01/01 y a:aa 1 2
2010/01/02 z a:aa 1 3
>>>2
>>>=0
# this matches the second-level account, displays the first-level name, aggregates by reporting interval
bin/hledger -f - register aa --depth 1 --daily
<<<
@ -46,4 +48,4 @@ bin/hledger -f - register aa --depth 1 --daily
>>>
2010/01/01 - 2010/01/01 a 2 2
2010/01/02 - 2010/01/02 a 1 3
>>>2
>>>=0

View File

@ -8,6 +8,8 @@ bin/hledger -f- register --period 'monthly'
>>>
2010/02/01 - 2010/02/28 a 1 1
b -1 0
>>>=0
#
# with --empty, the same:
bin/hledger -f- register --period 'monthly' --empty
@ -18,6 +20,8 @@ bin/hledger -f- register --period 'monthly' --empty
>>>
2010/02/01 - 2010/02/28 a 1 1
b -1 0
>>>=0
#
# with --empty and start/end dates, show all intervals covering the specified period
bin/hledger -f- register --period 'monthly from 2010/1/10 to 2010/3/15' --empty
@ -30,6 +34,8 @@ bin/hledger -f- register --period 'monthly from 2010/1/10 to 2010/3/15' --empty
2010/02/01 - 2010/02/28 a 1 1
b -1 0
2010/03/01 - 2010/03/31 0 0
>>>=0
#
# with just one start/end date, get the other from the data
bin/hledger -f- register --period 'monthly from 2010/1/10' --empty
@ -41,3 +47,4 @@ bin/hledger -f- register --period 'monthly from 2010/1/10' --empty
2010/01/01 - 2010/01/31 0 0
2010/02/01 - 2010/02/28 a 1 1
b -1 0
>>>=0

View File

@ -9,3 +9,4 @@ o 2009/1/1 09:00:00
(something) 1.0h
>>>2
>>>= 0

View File

@ -5,6 +5,7 @@ bin/hledger -f- print
(virtual) 100
a 1
b
>>>=0
#
# 2. balanced virtual postings should be required to balance (themselves)
bin/hledger -f- print
@ -23,6 +24,7 @@ bin/hledger -f- print
[balanced virtual] -10
a 1
b
>>>=0
#
# 4. a virtual posting with implicit amount should be handled correctly
bin/hledger -f- print
@ -30,6 +32,7 @@ bin/hledger -f- print
2010/1/1 x
[a] 10
[b]
>>>=0
#
# 5. real and balanced virtual postings are balanced separately, and multiple blank virtuals are ok
bin/hledger -f- balance
@ -48,3 +51,4 @@ bin/hledger -f- balance
-10 f
--------------------
0
>>>=0