Mercurial > p > roundup > code
diff test/test_templating.py @ 6638:e1588ae185dc issue2550923_computed_property
merge from default branch. Fix travis.ci so CI builds don't error out
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Thu, 21 Apr 2022 16:54:17 -0400 |
| parents | 21c7c2041a4b |
| children | 5b71a50e833b |
line wrap: on
line diff
--- a/test/test_templating.py Fri Oct 08 00:37:16 2021 -0400 +++ b/test/test_templating.py Thu Apr 21 16:54:17 2022 -0400 @@ -422,6 +422,7 @@ groups[g], s)) #t('123.321.123.321', 'url') + t('https://example.com/demo/issue8#24MRV9BZYx:V:1B~sssssssssssssss~4~4', url="https://example.com/demo/issue8#24MRV9BZYx:V:1B~sssssssssssssss~4~4") t('http://localhost/', url='http://localhost/') t('http://roundup.net/', url='http://roundup.net/') t('http://richard@localhost/', url='http://richard@localhost/') @@ -439,6 +440,7 @@ t('r@a.com', email='r@a.com') t('i1', **{'class':'i', 'id':'1'}) t('item123', **{'class':'item', 'id':'123'}) + t('item 123', **{'class':'item', 'id':'123'}) t('www.user:pass@host.net', email='pass@host.net') t('user:pass@www.host.net', url='user:pass@www.host.net') t('123.35', nothing=True) @@ -448,6 +450,12 @@ p = StringHTMLProperty(self.client, 'test', '1', None, 'test', '') def t(s): return p.hyper_re.sub(p._hyper_repl, s) ae = self.assertEqual + ae(t('issue5#msg10'), '<a href="issue5#msg10">issue5#msg10</a>') + ae(t('issue5'), '<a href="issue5">issue5</a>') + ae(t('issue2255'), 'issue2255') + ae(t('foo https://example.com/demo/issue8#24MRV9BZYx:V:1B~sssssssssssssss~4~4 bar'), + 'foo <a href="https://example.com/demo/issue8#24MRV9BZYx:V:1B~sssssssssssssss~4~4" rel="nofollow noopener">' + 'https://example.com/demo/issue8#24MRV9BZYx:V:1B~sssssssssssssss~4~4</a> bar') ae(t('item123123123123'), 'item123123123123') ae(t('http://roundup.net/'), '<a href="http://roundup.net/" rel="nofollow noopener">http://roundup.net/</a>') @@ -478,9 +486,19 @@ # trailing punctuation is not included ae(t('http://roundup.net/%c ' % c), '<a href="http://roundup.net/" rel="nofollow noopener">http://roundup.net/</a>%c ' % c) + # trailing punctuation is not included without trailing space + ae(t('http://roundup.net/%c' % c), + '<a href="http://roundup.net/" rel="nofollow noopener">http://roundup.net/</a>%c' % c) # but it's included if it's part of the URL ae(t('http://roundup.net/%c/' % c), '<a href="http://roundup.net/%c/" rel="nofollow noopener">http://roundup.net/%c/</a>' % (c, c)) + # including with a non / terminated path + ae(t('http://roundup.net/test%c ' % c), + '<a href="http://roundup.net/test" rel="nofollow noopener">http://roundup.net/test</a>%c ' % c) + # but it's included if it's part of the URL path + ae(t('http://roundup.net/%ctest' % c), + '<a href="http://roundup.net/%ctest" rel="nofollow noopener">http://roundup.net/%ctest</a>' % (c, c)) + def test_input_html4(self): # boolean attributes are just the attribute name
