From d85357139748ea657f030ab314c39e70f56764f4 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 20 Dec 2017 23:55:48 +1300 Subject: Improve support for code language in JATS --- test/Tests/Readers/JATS.hs | 5 +++++ test/Tests/Writers/JATS.hs | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'test') 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" $ "

\n @&\n

" =?> para (code "@&") + , test jats "lang" $ "

\n @&\n

" =?> para (codeWith ("", ["c"], []) "@&") + ] + , testGroup "block code" + [ test jats "basic" $ "@&" =?> codeBlock "@&" + , test jats "lang" $ "@&" =?> codeBlockWith ("", ["c"], []) "@&" ] , testGroup "images" [ test jats "basic" $ "" 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 "@&" =?> "

\n @&\n

" + , "lang" =: codeWith ("", ["c"], []) "@&" =?> "

\n @&\n

" + ] + , testGroup "block code" + [ "basic" =: codeBlock "@&" =?> "@&" + , "lang" =: codeBlockWith ("", ["c"], []) "@&" =?> "@&" ] , testGroup "images" [ "basic" =: @@ -38,7 +43,7 @@ tests = [ testGroup "inline code" =?> "" ] , testGroup "inlines" - [ "Emphasis" =: emph ("emphasized") + [ "Emphasis" =: emph "emphasized" =?> "

\n emphasized\n

" ] , "bullet list" =: bulletList [ plain $ text "first" -- cgit v1.2.3