diff options
Diffstat (limited to 'tests/Tests/Readers/Markdown.hs')
-rw-r--r-- | tests/Tests/Readers/Markdown.hs | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/tests/Tests/Readers/Markdown.hs b/tests/Tests/Readers/Markdown.hs index ed79f9e3d..17bfd332e 100644 --- a/tests/Tests/Readers/Markdown.hs +++ b/tests/Tests/Readers/Markdown.hs @@ -119,6 +119,10 @@ bareLinkTests = autolink "http://business.timesonline.co.uk/article/0,,9065-2473189,00.html") , ("http://www.mail-archive.com/ruby-talk@ruby-lang.org/", autolink "http://www.mail-archive.com/ruby-talk@ruby-lang.org/") + , ("https://example.org/?anchor=lala-", + autolink "https://example.org/?anchor=lala-") + , ("https://example.org/?anchor=-lala", + autolink "https://example.org/?anchor=-lala") ] {- @@ -190,11 +194,25 @@ tests = [ testGroup "inline code" =?> para (link "/there.0" "" "hi") ] , testGroup "bare URIs" - (map testBareLink bareLinkTests) + (map testBareLink bareLinkTests) , testGroup "autolinks" [ "with unicode dash following" =: "<http://foo.bar>\8212" =?> para (autolink "http://foo.bar" <> str "\8212") + , "a partial URL (#2277)" =: + "<www.boe.es/buscar/act.php?id=BOE-A-1996-8930#a66>" =?> + para (text "<www.boe.es/buscar/act.php?id=BOE-A-1996-8930#a66>") + ] + , testGroup "links" + [ "no autolink inside link" =: + "[<https://example.org>](url)" =?> + para (link "url" "" (text "<https://example.org>")) + , "no inline link inside link" =: + "[[a](url2)](url)" =?> + para (link "url" "" (text "[a](url2)")) + , "no bare URI inside link" =: + "[https://example.org(](url)" =?> + para (link "url" "" (text "https://example.org(")) ] , testGroup "Headers" [ "blank line before header" =: |