From e1454fe0d0e2f1cb4e9c5753f095a1f0a8580ffe Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Mon, 1 Mar 2021 14:14:58 +0100 Subject: Jira writer: use Span identifiers as anchors Closes: tarleb/jira-wiki-markup#3. --- test/Tests/Writers/Jira.hs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'test') 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" + ] ] ] -- cgit v1.2.3