aboutsummaryrefslogtreecommitdiff
path: root/test/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'test/Tests')
-rw-r--r--test/Tests/Readers/HTML.hs7
-rw-r--r--test/Tests/Readers/Muse.hs20
2 files changed, 25 insertions, 2 deletions
diff --git a/test/Tests/Readers/HTML.hs b/test/Tests/Readers/HTML.hs
index eedb99029..514b6bb7b 100644
--- a/test/Tests/Readers/HTML.hs
+++ b/test/Tests/Readers/HTML.hs
@@ -7,6 +7,7 @@ import Data.Text (Text)
import qualified Data.Text as T
import Test.Tasty
import Test.Tasty.QuickCheck
+import Test.Tasty.Options (IsOption(defaultValue))
import Tests.Helpers
import Text.Pandoc
import Text.Pandoc.Arbitrary ()
@@ -77,5 +78,9 @@ 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" (withMaxSuccess 25 roundTrip)
+ , askOption $ \(QuickCheckTests numtests) ->
+ testProperty "Round trip" $
+ withMaxSuccess (if QuickCheckTests numtests == defaultValue
+ then 25
+ else numtests) roundTrip
]
diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs
index 958a74915..bd63236bd 100644
--- a/test/Tests/Readers/Muse.hs
+++ b/test/Tests/Readers/Muse.hs
@@ -8,6 +8,7 @@ import Data.Text (Text)
import qualified Data.Text as T
import Test.Tasty
import Test.Tasty.QuickCheck
+import Test.Tasty.Options (IsOption(defaultValue))
import Tests.Helpers
import Text.Pandoc
import Text.Pandoc.Arbitrary ()
@@ -156,6 +157,8 @@ tests =
, "One character code" =: "=c=" =?> para (code "c")
+ , "Code with equal sign" =: "=foo = bar=" =?> para (code "foo = bar")
+
, "Three = characters is not a code" =: "===" =?> para "==="
, "Multiline code markup" =:
@@ -260,7 +263,11 @@ tests =
]
, testGroup "Blocks"
- [ testProperty "Round trip" (withMaxSuccess 25 roundTrip)
+ [ askOption $ \(QuickCheckTests numtests) ->
+ testProperty "Round trip" $
+ withMaxSuccess (if QuickCheckTests numtests == defaultValue
+ then 25
+ else numtests) roundTrip
, "Block elements end paragraphs" =:
T.unlines [ "First paragraph"
, "----"
@@ -891,6 +898,17 @@ tests =
[[plain "", plain "Foo"],
[plain "", plain ""],
[plain "bar", plain ""]]
+ , "Empty cell in the middle" =:
+ T.unlines
+ [ " 1 | 2 | 3"
+ , " 4 | | 6"
+ , " 7 | 8 | 9"
+ ] =?>
+ table mempty [(AlignDefault, 0.0), (AlignDefault, 0.0), (AlignDefault, 0.0)]
+ []
+ [[plain "1", plain "2", plain "3"],
+ [plain "4", mempty, plain "6"],
+ [plain "7", plain "8", plain "9"]]
]
, testGroup "Lists"
[ "Bullet list" =: