X-Git-Url: https://code.delx.au/offlineimap/blobdiff_plain/e76000bc1846d6a989bfab9e4db5319304562df2..33b19c27f63442c8b5705aac5f8862831fba70ad:/testsrc/TestInfrastructure.hs diff --git a/testsrc/TestInfrastructure.hs b/testsrc/TestInfrastructure.hs index ec22ba7..96db4ad 100644 --- a/testsrc/TestInfrastructure.hs +++ b/testsrc/TestInfrastructure.hs @@ -82,13 +82,18 @@ runVerbTestText (HU.PutText put us) t = do path' = HU.showPath (HU.path ss) q :: Testable a => String -> a -> HU.Test -q = qccheck (defaultConfig {configMaxTest = 250, configMaxFail = 10000, +q = qccheck (defaultConfig {configMaxTest = 250, configMaxFail = 20000, configEvery = \_ _ -> ""}) -- configEvery = testCount for displaying a running test counter where testCountBase n = " (test " ++ show n ++ "/250)" testCount n _ = testCountBase n ++ replicate (length (testCountBase n)) '\b' +qverbose :: Testable a => String -> a -> HU.Test +qverbose = qccheck (defaultConfig {configMaxTest = 250, configMaxFail = 20000, + configEvery = \n args -> show n ++ ":\n" ++ unlines args}) + + {- | Test a parser, forcing it to apply to all input. -} p parser input = case parse parseTest "(none)" input of