aboutsummaryrefslogtreecommitdiff
path: root/test/Tests/Writers/JATS.hs
diff options
context:
space:
mode:
Diffstat (limited to 'test/Tests/Writers/JATS.hs')
-rw-r--r--test/Tests/Writers/JATS.hs38
1 files changed, 12 insertions, 26 deletions
diff --git a/test/Tests/Writers/JATS.hs b/test/Tests/Writers/JATS.hs
index 572b16451..723c0e8a8 100644
--- a/test/Tests/Writers/JATS.hs
+++ b/test/Tests/Writers/JATS.hs
@@ -30,8 +30,8 @@ infix 4 =:
tests :: [TestTree]
tests = [ testGroup "inline code"
- [ "basic" =: code "@&" =?> "<p>\n <monospace>@&amp;</monospace>\n</p>"
- , "lang" =: codeWith ("", ["c"], []) "@&" =?> "<p>\n <code language=\"c\">@&amp;</code>\n</p>"
+ [ "basic" =: code "@&" =?> "<p><monospace>@&amp;</monospace></p>"
+ , "lang" =: codeWith ("", ["c"], []) "@&" =?> "<p><code language=\"c\">@&amp;</code></p>"
]
, testGroup "block code"
[ "basic" =: codeBlock "@&" =?> "<preformat>@&amp;</preformat>"
@@ -44,7 +44,7 @@ tests = [ testGroup "inline code"
]
, testGroup "inlines"
[ "Emphasis" =: emph "emphasized"
- =?> "<p>\n <italic>emphasized</italic>\n</p>"
+ =?> "<p><italic>emphasized</italic></p>"
]
, "bullet list" =: bulletList [ plain $ text "first"
, plain $ text "second"
@@ -52,19 +52,13 @@ tests = [ testGroup "inline code"
]
=?> "<list list-type=\"bullet\">\n\
\ <list-item>\n\
- \ <p>\n\
- \ first\n\
- \ </p>\n\
+ \ <p>first</p>\n\
\ </list-item>\n\
\ <list-item>\n\
- \ <p>\n\
- \ second\n\
- \ </p>\n\
+ \ <p>second</p>\n\
\ </list-item>\n\
\ <list-item>\n\
- \ <p>\n\
- \ third\n\
- \ </p>\n\
+ \ <p>third</p>\n\
\ </list-item>\n\
\</list>"
, testGroup "definition lists"
@@ -72,24 +66,18 @@ tests = [ testGroup "inline code"
[plain (text "hi there")])] =?>
"<def-list>\n\
\ <def-item>\n\
- \ <term>\n\
- \ <xref alt=\"testing\" rid=\"go\">testing</xref>\n\
- \ </term>\n\
+ \ <term><xref alt=\"testing\" rid=\"go\">testing</xref></term>\n\
\ <def>\n\
- \ <p>\n\
- \ hi there\n\
- \ </p>\n\
+ \ <p>hi there</p>\n\
\ </def>\n\
\ </def-item>\n\
\</def-list>"
]
, testGroup "math"
[ "escape |" =: para (math "\\sigma|_{\\{x\\}}") =?>
- "<p>\n\
- \ <inline-formula><alternatives>\n\
- \ <tex-math><![CDATA[\\sigma|_{\\{x\\}}]]></tex-math>\n\
- \ <mml:math display=\"inline\" xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"><mml:mrow><mml:mi>σ</mml:mi><mml:msub><mml:mo stretchy=\"false\" form=\"prefix\">|</mml:mo><mml:mrow><mml:mo stretchy=\"false\" form=\"prefix\">{</mml:mo><mml:mi>x</mml:mi><mml:mo stretchy=\"false\" form=\"postfix\">}</mml:mo></mml:mrow></mml:msub></mml:mrow></mml:math></alternatives></inline-formula>\n\
- \</p>"
+ "<p><inline-formula><alternatives>\n\
+ \<tex-math><![CDATA[\\sigma|_{\\{x\\}}]]></tex-math>\n\
+ \<mml:math display=\"inline\" xmlns:mml=\"http://www.w3.org/1998/Math/MathML\"><mml:mrow><mml:mi>σ</mml:mi><mml:msub><mml:mo stretchy=\"false\" form=\"prefix\">|</mml:mo><mml:mrow><mml:mo stretchy=\"false\" form=\"prefix\">{</mml:mo><mml:mi>x</mml:mi><mml:mo stretchy=\"false\" form=\"postfix\">}</mml:mo></mml:mrow></mml:msub></mml:mrow></mml:math></alternatives></inline-formula></p>"
]
, testGroup "headers"
[ "unnumbered header" =:
@@ -97,9 +85,7 @@ tests = [ testGroup "inline code"
(text "Header 1" <> note (plain $ text "note")) =?>
"<sec id=\"foo\">\n\
\ <title>Header 1<fn>\n\
- \ <p>\n\
- \ note\n\
- \ </p>\n\
+ \ <p>note</p>\n\
\ </fn></title>\n\
\</sec>"
, "unnumbered sub header" =: