Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

Commit

Permalink
new conformance behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
bcherry committed Oct 4, 2010
1 parent 1d0ed15 commit 49f08f5
Showing 1 changed file with 33 additions and 5 deletions.
38 changes: 33 additions & 5 deletions autolink.yml
Original file line number Diff line number Diff line change
Expand Up @@ -292,21 +292,49 @@ tests:
text: "http://example.mobi/path"
expected: "<a href=\"http://example.mobi/path\">http://example.mobi/path</a>"

- description: "Autolink url containing ending with #value (not as url + hashtag)"
text: "http://foo.com/?#foo"
expected: "<a href=\"http://foo.com/?#foo\">http://foo.com/?#foo</a>"

- description: "Autolink url without protocol (with www)"
text: "www.example.com"
expected: "<a href=\"http://www.example.com\">www.example.com</a>"
text: "www.example.biz"
expected: "<a href=\"http://www.example.biz\">www.example.biz</a>"

- description: "Autolink url without protocol (with WWW)"
text: "WWW.EXAMPLE.COM"
expected: "<a href=\"http://WWW.EXAMPLE.COM\">WWW.EXAMPLE.COM</a>"
text: "WWW.EXAMPLE.BIZ"
expected: "<a href=\"http://WWW.EXAMPLE.BIZ\">WWW.EXAMPLE.biz</a>"

- description: "Autolink URL without protocol and without www (ending in .com)"
text: "foo.com"
expected: "<a href=\"http://foo.com\">foo.com</a>"

- description: "Autolink URL without protocol and without www (ending in .org)"
text: "foo.org"
expected: "<a href=\"http://foo.org\">foo.org</a>"

- description: "Autolink URL without protocol and without www (ending in .net)"
text: "foo.net"
expected: "<a href=\"http://foo.net\">foo.net</a>"

- description: "Autolink URL without protocol and without www (ending in .gov)"
text: "foo.gov"
expected: "<a href=\"http://foo.gov\">foo.gov</a>"

- description: "Autolink URL without protocol and without www (ending in .edu)"
text: "foo.edu"
expected: "<a href=\"http://foo.edu\">foo.edu</a>"

- description: "Autolink URL without protocol and without www not ending in /.(edu|com|gov|org|net)/"
text: "foo.it twitter.co.jp foo.commerce foo.nettastic foo.us foo.co.uk"
expected: "foo.it twitter.co.jp foo.commerce foo.nettastic foo.us foo.co.uk"

- description: "Multiple URLs with different protocols"
text: "http://foo.com AND https://bar.com AND www.foobar.com"
expected: "<a href=\"http://foo.com\">http://foo.com</a> AND <a href=\"https://bar.com\">https://bar.com</a> AND <a href=\"http://www.foobar.com\">www.foobar.com</a>"

- description: "Autolink raw domain followed by domain"
text: "See http://example.com example.com"
expected: "See <a href=\"http://example.com\">http://example.com</a> example.com"
expected: "See <a href=\"http://example.com\">http://example.com</a> <a href=\"http://example.com\">example.com</a>"

- description: "Autolink url that includes @-sign and numeric dir under it"
text: "http://www.flickr.com/photos/29674651@N00/4382024406"
Expand Down

0 comments on commit 49f08f5

Please sign in to comment.