pandoc/test/Tests/Writers/Jira.hs
Albert Krewinkel ff9be6b384
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.
2020-03-31 09:57:59 +02:00

27 lines
634 B
Haskell

{-# 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+"
]
]