pandoc/test/Tests/Writers/Jira.hs
Albert Krewinkel d867cac8ca
Jira reader: resolve parsing issues of blockquote, color
Parsing problems occurring with block quotes and colored text have been
resolved.

Fixes: #6233
Fixes: #6235
2020-04-03 13:25:52 +02:00

32 lines
818 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+"
, "image with attributes" =:
imageWith ("", [], [("align", "right"), ("height", "50")])
"image.png" "" mempty =?>
"!image.png|align=right, height=50!"
]
]