Safe Haskell | None |
---|
Wheat - Penny ledger tests
Wheat helps you build tests to check all the postings in your ledger. Perhaps you want to make sure all the account names are valid, or that your checking account has no unreconciled transactions. With Wheat you can easily build a command line program that will check all the postings in a ledger for you against criteria that you specify.
- data WheatConf = WheatConf {
- briefDescription :: String
- moreHelp :: [String]
- tests :: [UTCTime -> TestTree PostFam]
- indentAmt :: IndentAmt
- passVerbosity :: Verbosity
- failVerbosity :: Verbosity
- groupPred :: Name -> Bool
- testPred :: Name -> Bool
- showSkippedTests :: Bool
- groupVerbosity :: GroupVerbosity
- stopOnFail :: Bool
- colorToFile :: Bool
- baseTime :: UTCTime
- ledgers :: [String]
- eachPostingMustBeTrue :: Name -> Pdct PostFam -> TestTree PostFam
- atLeastNPostings :: Int -> Name -> Pdct PostFam -> TestTree PostFam
- futureFirstsOfTheMonth :: Day -> [Day]
- main :: (Runtime -> WheatConf) -> IO ()
Configuration
Record holding all data to configure Wheat.
WheatConf | |
|
Tests
eachPostingMustBeTrue :: Name -> Pdct PostFam -> TestTree PostFamSource
Passes only if each posting is True.
:: Int | The number of postings that must be true for the test to pass |
-> Name | |
-> Pdct PostFam | |
-> TestTree PostFam |
Passes if at least a particular number of postings is True.
Convenience functions
futureFirstsOfTheMonth :: Day -> [Day]Source
A non-terminating list of starting with the first day of the first month following the given day, followed by successive first days of the month.