diff options
Diffstat (limited to 'test/Tests/Writers')
-rw-r--r-- | test/Tests/Writers/HTML.hs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/Tests/Writers/HTML.hs b/test/Tests/Writers/HTML.hs index de8b1ef17..94549e0d8 100644 --- a/test/Tests/Writers/HTML.hs +++ b/test/Tests/Writers/HTML.hs @@ -13,6 +13,11 @@ import Text.Pandoc.Builder html :: (ToPandoc a) => a -> String html = unpack . purely (writeHtml4String def{ writerWrapText = WrapNone }) . toPandoc +htmlQTags :: (ToPandoc a) => a -> String +htmlQTags = unpack + . purely (writeHtml4String def{ writerWrapText = WrapNone, writerHtmlQTags = True }) + . toPandoc + {- "my test" =: X =?> Y @@ -48,4 +53,16 @@ tests = [ testGroup "inline code" definitionList [(mempty, [para $ text "foo bar"])] =?> "<dl><dt></dt><dd><p>foo bar</p></dd></dl>" ] + , testGroup "quotes" + [ "quote with cite attribute (without q-tags)" =: + doubleQuoted (spanWith ("", [], [("cite", "http://example.org")]) (str "examples")) + =?> "“<span cite=\"http://example.org\">examples</span>”" + , tQ "quote with cite attribute (with q-tags)" $ + doubleQuoted (spanWith ("", [], [("cite", "http://example.org")]) (str "examples")) + =?> "<q cite=\"http://example.org\">examples</q>" + ] ] + where + tQ :: (ToString a, ToPandoc a) + => String -> (a, String) -> TestTree + tQ = test htmlQTags |