diff --git a/tests/amount-layout-vertical.test b/tests/amount-layout-vertical.test index f5d87e6d6..b3bf94bae 100644 --- a/tests/amount-layout-vertical.test +++ b/tests/amount-layout-vertical.test @@ -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 # <<< diff --git a/tests/cleared-marker.test b/tests/cleared-marker.test index 32e427758..650eb9450 100644 --- a/tests/cleared-marker.test +++ b/tests/cleared-marker.test @@ -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 diff --git a/tests/commodities.test b/tests/commodities.test index c4d1e947e..3c2dc7497 100644 --- a/tests/commodities.test +++ b/tests/commodities.test @@ -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 diff --git a/tests/filter-patterns.test b/tests/filter-patterns.test index 32a35e881..f9b452ece 100644 --- a/tests/filter-patterns.test +++ b/tests/filter-patterns.test @@ -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 diff --git a/tests/parse-blank-description.test b/tests/parse-blank-description.test index b81ab12d1..1326af250 100644 --- a/tests/parse-blank-description.test +++ b/tests/parse-blank-description.test @@ -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 diff --git a/tests/precision.test b/tests/precision.test index 254a34d5c..5570c2d55 100644 --- a/tests/precision.test +++ b/tests/precision.test @@ -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 <<< diff --git a/tests/prices.test b/tests/prices.test index 1fe0167be..be87da26d 100644 --- a/tests/prices.test +++ b/tests/prices.test @@ -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 diff --git a/tests/register-depth.test b/tests/register-depth.test index c44ef7bb0..3cb5d3a9b 100644 --- a/tests/register-depth.test +++ b/tests/register-depth.test @@ -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 diff --git a/tests/reporting-intervals.test b/tests/reporting-intervals.test index 05bb6486a..015958d24 100644 --- a/tests/reporting-intervals.test +++ b/tests/reporting-intervals.test @@ -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 diff --git a/tests/timelog.test b/tests/timelog.test index 218286fcd..25ac7d1d0 100644 --- a/tests/timelog.test +++ b/tests/timelog.test @@ -9,3 +9,4 @@ o 2009/1/1 09:00:00 (something) 1.0h >>>2 +>>>= 0 diff --git a/tests/virtual.test b/tests/virtual.test index 675d62f85..f7408bc6e 100644 --- a/tests/virtual.test +++ b/tests/virtual.test @@ -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