diff options
author | Albert Krewinkel <albert@zeitkraut.de> | 2020-02-13 05:36:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-12 20:36:02 -0800 |
commit | f5ea5f0aad1d5000b326ce4c45c92fdfb1a4b5d3 (patch) | |
tree | 5f309df515abe99fc97c4bab645387d63a5d57f3 /test/Tests | |
parent | e9cb08e74cc234b743dfb720d1e25b6777a8724d (diff) | |
download | pandoc-f5ea5f0aad1d5000b326ce4c45c92fdfb1a4b5d3.tar.gz |
Introduce new format variants for JATS (#6067)
New formats:
- `jats_archiving` for the "Archiving and Interchange Tag Set",
- `jats_publishing` for the "Journal Publishing Tag Set", and
- `jats_articleauthoring` for the "Article Authoring Tag Set."
The "jats" output format is now an alias for "jats_archiving".
Closes: #6014
Diffstat (limited to 'test/Tests')
-rw-r--r-- | test/Tests/Old.hs | 9 | ||||
-rw-r--r-- | test/Tests/Writers/JATS.hs | 16 |
2 files changed, 23 insertions, 2 deletions
diff --git a/test/Tests/Old.hs b/test/Tests/Old.hs index 3543cdbb3..2851db5d4 100644 --- a/test/Tests/Old.hs +++ b/test/Tests/Old.hs @@ -94,7 +94,14 @@ tests pandocPath = [ testGroup "writer" $ writerTests' "docbook5" ] , testGroup "jats" - [ testGroup "writer" $ writerTests' "jats" + [ testGroup "writer" + [ testGroup "jats_archiving" $ + writerTests' "jats_archiving" + , testGroup "jats_articleauthoring" $ + writerTests' "jats_articleauthoring" + , testGroup "jats_publishing" $ + writerTests' "jats_publishing" + ] , test' "reader" ["-r", "jats", "-w", "native", "-s"] "jats-reader.xml" "jats-reader.native" ] diff --git a/test/Tests/Writers/JATS.hs b/test/Tests/Writers/JATS.hs index 6de058701..7d98f979b 100644 --- a/test/Tests/Writers/JATS.hs +++ b/test/Tests/Writers/JATS.hs @@ -11,7 +11,14 @@ import Text.Pandoc.Arbitrary () import Text.Pandoc.Builder jats :: (ToPandoc a) => a -> String -jats = unpack . purely (writeJATS def{ writerWrapText = WrapNone }) . toPandoc +jats = unpack + . purely (writeJATS def{ writerWrapText = WrapNone }) + . toPandoc + +jatsArticleAuthoring :: (ToPandoc a) => a -> String +jatsArticleAuthoring = unpack + . purely (writeJatsArticleAuthoring def{ writerWrapText = WrapNone }) + . toPandoc {- "my test" =: X =?> Y @@ -47,6 +54,13 @@ tests = [ testGroup "inline code" , testGroup "inlines" [ "Emphasis" =: emph "emphasized" =?> "<p><italic>emphasized</italic></p>" + + , test jatsArticleAuthoring "footnote in articleauthoring tag set" + ("test" <> note (para "footnote") =?> + unlines [ "<p>test<fn>" + , " <p>footnote</p>" + , "</fn></p>" + ]) ] , "bullet list" =: bulletList [ plain $ text "first" , plain $ text "second" |