aboutsummaryrefslogtreecommitdiff
path: root/test/Tests
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-09-27 09:45:46 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2018-09-27 09:47:09 -0700
commit13f8f3c1a8b4a8b01a7ba71a7e42afa6615e537b (patch)
treed47a919a5d44dfe7adc8d59bb5ca7ceb9125ec66 /test/Tests
parentb69f7d8810ad5d2b59d6954bc6a478293672f2a8 (diff)
downloadpandoc-13f8f3c1a8b4a8b01a7ba71a7e42afa6615e537b.tar.gz
HTML, Muse reader tests: reduce time taken by round-trip test.
Diffstat (limited to 'test/Tests')
-rw-r--r--test/Tests/Readers/HTML.hs8
-rw-r--r--test/Tests/Readers/Muse.hs2
2 files changed, 6 insertions, 4 deletions
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 "<main> followed by text" $ "<main>main content</main>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"
, "----"