Skip to content

Commit 90fbc84

Browse files
committed
added test for hash and comma in URL
1 parent a202185 commit 90fbc84

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ def setUp(self):
2828

2929
# General Tests ------------------------------------------------------------
3030
# --------------------------------------------------------------------------
31+
def test_urls(self):
32+
"""Confirm that # in a URL works along with ,"""
33+
result = self.parser.parse(u'big url: http://blah.com:8080/path/to/here?p=1&q=abc,def#posn2 #ahashtag')
34+
self.assertEqual(result.urls, [u'http://blah.com:8080/path/to/here?p=1&q=abc,def#posn2'])
35+
self.assertEqual(result.tags, [u'ahashtag'])
36+
3137
def test_all_not_allow_amp_without_question(self):
3238
result = self.parser.parse(u'Check out: http://www.github.com/test&@username')
3339
self.assertEqual(result.html, u'Check out: <a href="http://www.github.com/test">http://www.github.com/test</a>&<a href="http://twitter.com/username">@username</a>')

0 commit comments

Comments
 (0)