test for too-loose transaction parsing

This commit is contained in:
Simon Michael 2009-04-10 04:27:16 +00:00
parent 638238dc5c
commit 0b22774ec9

View File

@ -560,6 +560,8 @@ tests = [
,"ledgerTransaction" ~: do ,"ledgerTransaction" ~: do
parseWithCtx ledgerTransaction entry1_str `parseis` entry1 parseWithCtx ledgerTransaction entry1_str `parseis` entry1
assertBool "ledgerTransaction should not parse just a date"
$ isLeft $ parseWithCtx ledgerTransaction "2009/1/1\n"
,"ledgerHistoricalPrice" ~: do ,"ledgerHistoricalPrice" ~: do
parseWithCtx ledgerHistoricalPrice price1_str `parseis` price1 parseWithCtx ledgerHistoricalPrice price1_str `parseis` price1