mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-17 02:51:07 +00:00
query and anchor quoting tests
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@2868 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
f14fe42fd1
commit
19a290d81a
1 changed files with 8 additions and 0 deletions
|
|
@ -89,6 +89,12 @@ class TestUrl (unittest.TestCase):
|
|||
url = "http://www.company.com/path/doc.html?url=/path2/doc2.html?foo=bar"
|
||||
nurl = url
|
||||
self.assertEqual(url_norm(url), nurl)
|
||||
url = "http://example.com/#a b"
|
||||
nurl = "http://example.com/#a%20b"
|
||||
self.assertEqual(url_norm(url), nurl)
|
||||
url = "http://example.com/?u=http://example2.com?b=c "
|
||||
nurl ="http://example.com/?u=http://example2.com?b=c%20"
|
||||
self.assertEqual(url_norm(url), nurl)
|
||||
|
||||
def test_norm_case_sensitivity (self):
|
||||
"""
|
||||
|
|
@ -412,6 +418,8 @@ class TestUrl (unittest.TestCase):
|
|||
self.assert_(linkcheck.url.url_needs_quoting(url), repr(url))
|
||||
url = "http://www.imadoofus.com/#a!"
|
||||
self.assert_(not linkcheck.url.url_needs_quoting(url), repr(url))
|
||||
url = "http://www.imadoofus.com/#a b"
|
||||
self.assert_(linkcheck.url.url_needs_quoting(url), repr(url))
|
||||
|
||||
def test_absolute_url (self):
|
||||
url = "hutzli:"
|
||||
|
|
|
|||
Loading…
Reference in a new issue