diff options
author | Albert Krewinkel <albert@zeitkraut.de> | 2020-03-31 09:57:59 +0200 |
---|---|---|
committer | Albert Krewinkel <albert@zeitkraut.de> | 2020-03-31 09:57:59 +0200 |
commit | ff9be6b38429b502b1582f2395b824305eb8c99c (patch) | |
tree | cf00c6ac9be4e80761c40d610d0db28914d30ad2 /test/Tests | |
parent | 9a42bec7fc8387bf7780cc3d3140c543e0ec6e32 (diff) | |
download | pandoc-ff9be6b38429b502b1582f2395b824305eb8c99c.tar.gz |
Jira writer: convert spans with class `underline` to inserted text
Spans with class `underline` as converted into Jira text marked as
`+inserted+`, i.e. surrounded by plus-signs.
Diffstat (limited to 'test/Tests')
-rw-r--r-- | test/Tests/Writers/Jira.hs | 27 |
1 files changed, 27 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+" + ] + ] |