File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -141,6 +141,11 @@ def test_url_one_letter_iana(self):
141
141
self .assertEqual (result .html , u'text <a href="http://X.org/">http://X.org/</a>' )
142
142
self .assertEqual (result .urls , [u'http://X.org/' ])
143
143
144
+ def test_url_long_hypens (self ):
145
+ result = self .parser .parse (u'text http://word-and-a-number-8-ftw.domain.tld/' )
146
+ self .assertEqual (result .html , u'text <a href="http://word-and-a-number-8-ftw.domain.tld/">http://word-and-a-number-8-...</a>' )
147
+ self .assertEqual (result .urls , [u'http://word-and-a-number-8-ftw.domain.tld/' ])
148
+
144
149
145
150
# URL not tests ------------------------------------------------------------
146
151
def test_not_url_dotdotdot (self ):
@@ -230,6 +235,11 @@ def test_url_followed_semicolon(self):
230
235
self .assertEqual (result .html , u'text <a href="http://example.com">http://example.com</a>;' )
231
236
self .assertEqual (result .urls , [u'http://example.com' ])
232
237
238
+ def test_url_followed_hypen (self ):
239
+ result = self .parser .parse (u'text http://domain.tld-that-you-should-have-put-a-space-after' )
240
+ self .assertEqual (result .html , u'text <a href="http://domain.tld">http://domain.tld</a>-that-you-should-have-put-a-space-after' )
241
+ self .assertEqual (result .urls , [u'http://domain.tld' ])
242
+
233
243
234
244
# URL preceeded Tests -------------------------------------------------------
235
245
def test_url_preceeded_colon (self ):
You can’t perform that action at this time.
0 commit comments