aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2021-05-25 16:54:42 +0200
committerAlbert Krewinkel <albert@zeitkraut.de>2021-05-25 16:54:42 +0200
commitd46ea7d7da3f842d265f09730c90cfc3691576ef (patch)
treea37126d86fa62f57063b8c36403541d5ec1a0adf /test
parent8511f6fdf6c9fbc2cc926538bca4ae9f554b4ed9 (diff)
downloadpandoc-d46ea7d7da3f842d265f09730c90cfc3691576ef.tar.gz
Jira: add support for "smart" links
Support has been added for the new `[alias|https://example.com|smart-card]` syntax.
Diffstat (limited to 'test')
-rw-r--r--test/Tests/Readers/Jira.hs8
-rw-r--r--test/Tests/Writers/Jira.hs8
2 files changed, 16 insertions, 0 deletions
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"