From a56da854b354844c0c9c4880de346df63791cc5b Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Wed, 15 Oct 2008 21:10:36 +0000 Subject: [PATCH] add a register command test --- Tests.hs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Tests.hs b/Tests.hs index b0b536a03..27a61ae08 100644 --- a/Tests.hs +++ b/Tests.hs @@ -77,6 +77,7 @@ unittests = TestList [ functests = TestList [ balancecommandtests + ,registercommandtests ] balancecommandtests = TestList [ @@ -179,6 +180,13 @@ balancecommandtests = TestList [ assertequal "" $ showBalanceReport [] ["-e"] l ] +registercommandtests = TestList [ + "register does something" ~: + do + l <- ledgerfromfile "sample.ledger" + assertnotequal "" $ showTransactionsWithBalances [] [] l + ] + -- | Assert a parsed thing equals some expected thing, or print a parse error. assertparseequal :: (Show a, Eq a) => a -> (Either ParseError a) -> Assertion assertparseequal expected parsed = either printParseError (assertequal expected) parsed