diff options
author | Hamish Mackenzie <Hamish.K.Mackenzie@googlemail.com> | 2017-12-20 23:55:48 +1300 |
---|---|---|
committer | Hamish Mackenzie <Hamish.K.Mackenzie@googlemail.com> | 2017-12-22 15:24:54 +1300 |
commit | d85357139748ea657f030ab314c39e70f56764f4 (patch) | |
tree | c85eaa9f1762ed93d6bc51ee050eb1e599061f03 /test | |
parent | 5d3c9e56460165be452b672f12fc476e7a5ed3a9 (diff) | |
download | pandoc-d85357139748ea657f030ab314c39e70f56764f4.tar.gz |
Improve support for code language in JATS
Diffstat (limited to 'test')
-rw-r--r-- | test/Tests/Readers/JATS.hs | 5 | ||||
-rw-r--r-- | test/Tests/Writers/JATS.hs | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/test/Tests/Readers/JATS.hs b/test/Tests/Readers/JATS.hs index ed6317c71..5c7dfa77c 100644 --- a/test/Tests/Readers/JATS.hs +++ b/test/Tests/Readers/JATS.hs @@ -14,6 +14,11 @@ jats = purely $ readJATS def tests :: [TestTree] tests = [ testGroup "inline code" [ test jats "basic" $ "<p>\n <monospace>@&</monospace>\n</p>" =?> para (code "@&") + , test jats "lang" $ "<p>\n <code language=\"c\">@&</code>\n</p>" =?> para (codeWith ("", ["c"], []) "@&") + ] + , testGroup "block code" + [ test jats "basic" $ "<preformat>@&</preformat>" =?> codeBlock "@&" + , test jats "lang" $ "<code language=\"c\">@&</code>" =?> codeBlockWith ("", ["c"], []) "@&" ] , testGroup "images" [ test jats "basic" $ "<graphic mimetype=\"image\" mime-subtype=\"\" xlink:href=\"/url\" xlink:title=\"title\" />" diff --git a/test/Tests/Writers/JATS.hs b/test/Tests/Writers/JATS.hs index cd4609849..f14f1c229 100644 --- a/test/Tests/Writers/JATS.hs +++ b/test/Tests/Writers/JATS.hs @@ -31,6 +31,11 @@ infix 4 =: tests :: [TestTree] tests = [ testGroup "inline code" [ "basic" =: code "@&" =?> "<p>\n <monospace>@&</monospace>\n</p>" + , "lang" =: codeWith ("", ["c"], []) "@&" =?> "<p>\n <code language=\"c\">@&</code>\n</p>" + ] + , testGroup "block code" + [ "basic" =: codeBlock "@&" =?> "<preformat>@&</preformat>" + , "lang" =: codeBlockWith ("", ["c"], []) "@&" =?> "<code language=\"c\">@&</code>" ] , testGroup "images" [ "basic" =: @@ -38,7 +43,7 @@ tests = [ testGroup "inline code" =?> "<graphic mimetype=\"image\" mime-subtype=\"\" xlink:href=\"/url\" xlink:title=\"title\" />" ] , testGroup "inlines" - [ "Emphasis" =: emph ("emphasized") + [ "Emphasis" =: emph "emphasized" =?> "<p>\n <italic>emphasized</italic>\n</p>" ] , "bullet list" =: bulletList [ plain $ text "first" |