From 13f8f3c1a8b4a8b01a7ba71a7e42afa6615e537b Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 27 Sep 2018 09:45:46 -0700 Subject: HTML, Muse reader tests: reduce time taken by round-trip test. --- test/Tests/Readers/HTML.hs | 8 +++++--- test/Tests/Readers/Muse.hs | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/Tests/Readers/HTML.hs b/test/Tests/Readers/HTML.hs index 21e004858..eedb99029 100644 --- a/test/Tests/Readers/HTML.hs +++ b/test/Tests/Readers/HTML.hs @@ -31,12 +31,14 @@ removeRawInlines x = x roundTrip :: Blocks -> Bool roundTrip b = d'' == d''' - where d = walk removeRawInlines $ walk makeRoundTrip $ Pandoc nullMeta $ toList b + where d = walk removeRawInlines $ + walk makeRoundTrip $ Pandoc nullMeta $ toList b d' = rewrite d d'' = rewrite d' d''' = rewrite d'' rewrite = html . T.pack . (++ "\n") . T.unpack . - purely (writeHtml5String def { writerWrapText = WrapPreserve }) + purely (writeHtml5String def + { writerWrapText = WrapPreserve }) tests :: [TestTree] tests = [ testGroup "base tag" @@ -75,5 +77,5 @@ tests = [ testGroup "base tag" , test htmlNativeDivs "
followed by text" $ "
main content
non-main content" =?> doc (divWith ("", [], [("role", "main")]) (plain (text "main content")) <> plain (text "non-main content")) ] - , testProperty "Round trip" roundTrip + , testProperty "Round trip" (withMaxSuccess 25 roundTrip) ] diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs index 02b68eb8e..8393e45d9 100644 --- a/test/Tests/Readers/Muse.hs +++ b/test/Tests/Readers/Muse.hs @@ -260,7 +260,7 @@ tests = ] , testGroup "Blocks" - [ testProperty "Round trip" roundTrip + [ testProperty "Round trip" (withMaxSuccess 25 roundTrip) , "Block elements end paragraphs" =: T.unlines [ "First paragraph" , "----" -- cgit v1.2.3