Mercurial > p > roundup > code
diff test/test_templating.py @ 4413:66603a9051f9
improve handling of '>' when URLs are converted to links
issue2550664 (thanks Ezio Melotti)
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Thu, 12 Aug 2010 05:00:07 +0000 |
| parents | d5239335fae3 |
| children | 399569ff4aed |
line wrap: on
line diff
--- a/test/test_templating.py Mon Aug 09 09:04:19 2010 +0000 +++ b/test/test_templating.py Thu Aug 12 05:00:07 2010 +0000 @@ -146,12 +146,14 @@ def test_url_replace(self): p = StringHTMLProperty(self.client, 'test', '1', None, 'test', '') def t(s): return p.hyper_re.sub(p._hyper_repl, s) - ae = self.assertEquals + ae = self.assertEqual ae(t('item123123123123'), 'item123123123123') ae(t('http://roundup.net/'), '<a href="http://roundup.net/">http://roundup.net/</a>') ae(t('<HTTP://roundup.net/>'), '<<a href="HTTP://roundup.net/">HTTP://roundup.net/</a>>') + ae(t('<http://roundup.net/>.'), + '<<a href="http://roundup.net/">http://roundup.net/</a>>.') ae(t('<www.roundup.net>'), '<<a href="http://www.roundup.net">www.roundup.net</a>>') ae(t('(www.roundup.net)'), @@ -165,6 +167,12 @@ ae(t('(e.g. http://en.wikipedia.org/wiki/Python_(programming_language)).'), '(e.g. <a href="http://en.wikipedia.org/wiki/Python_(programming_language)">' 'http://en.wikipedia.org/wiki/Python_(programming_language)</a>).') + ae(t('(e.g. http://en.wikipedia.org/wiki/Python_(programming_language))>.'), + '(e.g. <a href="http://en.wikipedia.org/wiki/Python_(programming_language)">' + 'http://en.wikipedia.org/wiki/Python_(programming_language)</a>)>.') + ae(t('(e.g. http://en.wikipedia.org/wiki/Python_(programming_language>)).'), + '(e.g. <a href="http://en.wikipedia.org/wiki/Python_(programming_language">' + 'http://en.wikipedia.org/wiki/Python_(programming_language</a>>)).') ''' class HTMLPermissions:
