diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-07-20 12:24:53 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-07-20 12:24:53 -0700 |
commit | 0f01421f81f6075d7f76e66b3d2515cddf5ccdb9 (patch) | |
tree | bede28b17b5e081e9e7794e8fcb317944a3ac540 /tests | |
parent | a7b64532f54725ebc20f066295307389b8b4cbe0 (diff) | |
download | pandoc-0f01421f81f6075d7f76e66b3d2515cddf5ccdb9.tar.gz |
AsciiDoc writer: Double markers in intraword emphasis.
Closes #1441.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Tests/Writers/AsciiDoc.hs | 25 | ||||
-rw-r--r-- | tests/writer.asciidoc | 8 |
2 files changed, 26 insertions, 7 deletions
diff --git a/tests/Tests/Writers/AsciiDoc.hs b/tests/Tests/Writers/AsciiDoc.hs index 118e648d3..f9e6bd154 100644 --- a/tests/Tests/Writers/AsciiDoc.hs +++ b/tests/Tests/Writers/AsciiDoc.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE OverloadedStrings #-} module Tests.Writers.AsciiDoc (tests) where import Test.Framework @@ -12,7 +11,27 @@ asciidoc :: (ToString a, ToPandoc a) => a -> String asciidoc = writeAsciiDoc def{ writerWrapText = False } . toPandoc tests :: [Test] -tests = [ testGroup "tables" +tests = [ testGroup "emphasis" + [ test asciidoc "emph word before" $ + para (text "foo" <> emph (text "bar")) =?> + "foo__bar__" + , test asciidoc "emph word after" $ + para (emph (text "foo") <> text "bar") =?> + "__foo__bar" + , test asciidoc "emph quoted" $ + para (doubleQuoted (emph (text "foo"))) =?> + "``__foo__''" + , test asciidoc "strong word before" $ + para (text "foo" <> strong (text "bar")) =?> + "foo**bar**" + , test asciidoc "strong word after" $ + para (strong (text "foo") <> text "bar") =?> + "**foo**bar" + , test asciidoc "strong quoted" $ + para (singleQuoted (strong (text "foo"))) =?> + "`**foo**'" + ] + , testGroup "tables" [ test asciidoc "empty cells" $ simpleTable [] [[mempty],[mempty]] =?> unlines [ "[cols=\"\",]" @@ -22,7 +41,7 @@ tests = [ testGroup "tables" , "|====" ] , test asciidoc "multiblock cells" $ - simpleTable [] [[para "Para 1" <> para "Para 2"]] + simpleTable [] [[para (text "Para 1") <> para (text "Para 2")]] =?> unlines [ "[cols=\"\",]" , "|=====" diff --git a/tests/writer.asciidoc b/tests/writer.asciidoc index fbe0036d8..799f174fd 100644 --- a/tests/writer.asciidoc +++ b/tests/writer.asciidoc @@ -429,11 +429,11 @@ Hr’s: Inline Markup ------------- -This is _emphasized_, and so _is this_. +This is __emphasized__, and so __is this__. -This is *strong*, and so *is this*. +This is **strong**, and so **is this**. -An _link:/url[emphasized link]_. +An __link:/url[emphasized link]__. *_This is strong and em._* @@ -445,7 +445,7 @@ So is *_this_* word. This is code: `>`, `$`, `\`, `\$`, `<html>`. -[line-through]*This is _strikeout_.* +[line-through]*This is __strikeout__.* Superscripts: a^bc^d a^_hello_^ a^hello there^. |