account/description matching is supposed to be case-insensitive, fix

This commit is contained in:
Simon Michael 2009-01-27 22:16:57 +00:00
parent 185168905e
commit d8989a357d
2 changed files with 9 additions and 1 deletions

View File

@ -152,4 +152,4 @@ isnegativepat pat = negateprefix `isPrefixOf` pat
abspat pat = if isnegativepat pat then drop (length negateprefix) pat else pat
positivepats = filter (not . isnegativepat)
negativepats = filter isnegativepat
matchregex pat str = containsRegex (mkRegexWithOpts pat True True) str
matchregex pat str = containsRegex (mkRegexWithOpts pat True False) str

View File

@ -514,6 +514,14 @@ registercommand_tests = TestList [
"")
$ showRegisterReport [] ["cash"] l
,
"register report with account pattern, case insensitive" ~:
do
l <- sampleledger
assertequal (
"2008/06/03 eat & shop assets:cash $-2 $-2\n" ++
"")
$ showRegisterReport [] ["cAsH"] l
,
"register report with display expression" ~:
do
l <- sampleledger