diff --git a/test/Test.hs b/test/Test.hs index aafd26b..6492943 100644 --- a/test/Test.hs +++ b/test/Test.hs @@ -164,8 +164,11 @@ prop_ppDiffR (DiffInput le ri) = let haskDiff=ppDiff $ getGroupedDiff le ri utilDiff= unsafePerformIO (runDiff (unlines le) (unlines ri)) in cover 90 (haskDiff == utilDiff) "exact match" $ - classify (haskDiff == utilDiff) "exact match" - (div ((length (lines haskDiff))*100) (length (lines utilDiff)) < 110) -- less than 10% bigger + classify (haskDiff == utilDiff) "exact match" $ + div + (length (lines haskDiff)*100) + (max 1 $ length $ lines utilDiff) + < 110 -- less than 10% bigger where runDiff left right = do leftFile <- writeTemp left