diff options
author | Albert Krewinkel <albert@zeitkraut.de> | 2021-03-01 14:14:58 +0100 |
---|---|---|
committer | Albert Krewinkel <albert@zeitkraut.de> | 2021-03-01 14:36:11 +0100 |
commit | e1454fe0d0e2f1cb4e9c5753f095a1f0a8580ffe (patch) | |
tree | b4d837f66e53b8b1684f2cc824cfe76c067fac91 /test | |
parent | 3793ed8beb5da0a8afbe8d3b121c2a1cd5bece44 (diff) | |
download | pandoc-e1454fe0d0e2f1cb4e9c5753f095a1f0a8580ffe.tar.gz |
Jira writer: use Span identifiers as anchors
Closes: tarleb/jira-wiki-markup#3.
Diffstat (limited to 'test')
-rw-r--r-- | test/Tests/Writers/Jira.hs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/Tests/Writers/Jira.hs b/test/Tests/Writers/Jira.hs index 93d830c94..aff8348d4 100644 --- a/test/Tests/Writers/Jira.hs +++ b/test/Tests/Writers/Jira.hs @@ -3,6 +3,7 @@ module Tests.Writers.Jira (tests) where import Data.Text (unpack) import Test.Tasty +import Test.Tasty.HUnit (HasCallStack) import Tests.Helpers import Text.Pandoc import Text.Pandoc.Arbitrary () @@ -12,7 +13,7 @@ jira :: (ToPandoc a) => a -> String jira = unpack . purely (writeJira def) . toPandoc infix 4 =: -(=:) :: (ToString a, ToPandoc a) +(=:) :: (ToString a, ToPandoc a, HasCallStack) => String -> (a, String) -> TestTree (=:) = test jira @@ -61,5 +62,11 @@ tests = linkWith ("", ["user-account"], []) "~johndoe" "" "~johndoe" =?> "[~johndoe]" ] + + , testGroup "spans" + [ "id is used as anchor" =: + spanWith ("unicorn", [], []) (str "Unicorn") =?> + "{anchor:unicorn}Unicorn" + ] ] ] |