diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/Tests/Writers/Jira.hs | 27 | ||||
-rw-r--r-- | test/test-pandoc.hs | 2 |
2 files changed, 29 insertions, 0 deletions
diff --git a/test/Tests/Writers/Jira.hs b/test/Tests/Writers/Jira.hs new file mode 100644 index 000000000..063497fd1 --- /dev/null +++ b/test/Tests/Writers/Jira.hs @@ -0,0 +1,27 @@ +{-# LANGUAGE OverloadedStrings #-} +module Tests.Writers.Jira (tests) where + +import Data.Text (unpack) +import Test.Tasty +import Tests.Helpers +import Text.Pandoc +import Text.Pandoc.Arbitrary () +import Text.Pandoc.Builder + +jira :: (ToPandoc a) => a -> String +jira = unpack . purely (writeJira def) . toPandoc + +infix 4 =: +(=:) :: (ToString a, ToPandoc a) + => String -> (a, String) -> TestTree +(=:) = test jira + +tests :: [TestTree] +tests = + [ testGroup "inlines" + [ "underlined text" =: + spanWith ("ignored", ["ignored", "underline"], [("foo", "bar")]) + "underlined text" =?> + "+underlined text+" + ] + ] diff --git a/test/test-pandoc.hs b/test/test-pandoc.hs index 9d64b61b6..6f013a95c 100644 --- a/test/test-pandoc.hs +++ b/test/test-pandoc.hs @@ -34,6 +34,7 @@ import qualified Tests.Writers.Docx import qualified Tests.Writers.FB2 import qualified Tests.Writers.HTML import qualified Tests.Writers.JATS +import qualified Tests.Writers.Jira import qualified Tests.Writers.LaTeX import qualified Tests.Writers.Markdown import qualified Tests.Writers.Muse @@ -57,6 +58,7 @@ tests pandocPath = testGroup "pandoc tests" , testGroup "LaTeX" Tests.Writers.LaTeX.tests , testGroup "HTML" Tests.Writers.HTML.tests , testGroup "JATS" Tests.Writers.JATS.tests + , testGroup "Jira" Tests.Writers.Jira.tests , testGroup "Docbook" Tests.Writers.Docbook.tests , testGroup "Markdown" Tests.Writers.Markdown.tests , testGroup "Org" Tests.Writers.Org.tests |