From 7a71f137eeacbd52bfc370cf325e3fbb234c8345 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sat, 22 Nov 2008 04:50:23 +0000 Subject: [PATCH] add a test for account filtering affecting balance report totals --- Tests.hs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Tests.hs b/Tests.hs index b9c2df078..7444bfcc7 100644 --- a/Tests.hs +++ b/Tests.hs @@ -198,6 +198,16 @@ balancecommandtests = TestList [ do l <- ledgerfromfile "sample.ledger" assertequal "" $ showBalanceReport [] ["-e"] l + , + "balance report negative patterns affect totals" ~: + do + l <- ledgerfromfile "sample.ledger" + assertequal ( + " $1 expenses\n" ++ + "--------------------\n" ++ + " $1\n" ++ + "") + $ showBalanceReport [] ["expenses","-food"] l ] registercommandtests = TestList [