From d46ea7d7da3f842d265f09730c90cfc3691576ef Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Tue, 25 May 2021 16:54:42 +0200 Subject: Jira: add support for "smart" links Support has been added for the new `[alias|https://example.com|smart-card]` syntax. --- test/Tests/Readers/Jira.hs | 8 ++++++++ test/Tests/Writers/Jira.hs | 8 ++++++++ 2 files changed, 16 insertions(+) (limited to 'test') diff --git a/test/Tests/Readers/Jira.hs b/test/Tests/Readers/Jira.hs index cb7dde4ea..b7194a3b9 100644 --- a/test/Tests/Readers/Jira.hs +++ b/test/Tests/Readers/Jira.hs @@ -167,6 +167,14 @@ tests = , "user with description" =: "[John Doe|~johndoe]" =?> para (linkWith ("", ["user-account"], []) "~johndoe" "" "John Doe") + + , "'smart' link" =: + "[x|http://example.com|smart-link]" =?> + para (linkWith ("", ["smart-link"], []) "http://example.com" "" "x") + + , "'smart' card" =: + "[x|http://example.com|smart-card]" =?> + para (linkWith ("", ["smart-card"], []) "http://example.com" "" "x") ] , "image" =: diff --git a/test/Tests/Writers/Jira.hs b/test/Tests/Writers/Jira.hs index d8e856e34..00a7ae931 100644 --- a/test/Tests/Writers/Jira.hs +++ b/test/Tests/Writers/Jira.hs @@ -61,6 +61,14 @@ tests = , "user link with user as description" =: linkWith ("", ["user-account"], []) "~johndoe" "" "~johndoe" =?> "[~johndoe]" + + , "'smart' link" =: + para (linkWith ("", ["smart-link"], []) "http://example.com" "" "x") =?> + "[x|http://example.com|smart-link]" + + , "'smart' card" =: + para (linkWith ("", ["smart-card"], []) "http://example.org" "" "x") =?> + "[x|http://example.org|smart-card]" ] , testGroup "spans" -- cgit v1.2.3