]> code.delx.au - offlineimap/blobdiff - testsrc/TestInfrastructure.hs
Working on respText
[offlineimap] / testsrc / TestInfrastructure.hs
index 41419bdddb9150b09afb03fba3c6ebe2fdd8d16d..9c228080bc3d61e84e54e12305e96d864d44ca13 100644 (file)
@@ -96,9 +96,14 @@ qverbose = qccheck (defaultConfig {configMaxTest = 250, configMaxFail = 20000,
 
 {- | Test a parser, forcing it to apply to all input. -}
 p parser input = 
-    case parse parseTest "(none)" input of
+    case p' parser input of
       Left _ -> Nothing
       Right y -> Just y
+
+p' parser input =
+    case parse parseTest "(none)" input of
+      Left x -> Left (show x)
+      Right y -> Right y
     where parseTest = do r <- parser
                          eof
                          return r