urlmatch: Add test for invalid IPv6 URL
This commit is contained in:
parent
174dd5dd9e
commit
d6ea9b1e47
@ -72,6 +72,9 @@ from qutebrowser.utils import urlmatch
|
|||||||
("http://foo:123456/", "Invalid port"),
|
("http://foo:123456/", "Invalid port"),
|
||||||
("http://foo:80:80/monkey", "Invalid port"),
|
("http://foo:80:80/monkey", "Invalid port"),
|
||||||
("chrome://foo:1234/bar", "Ports are unsupported with chrome scheme"),
|
("chrome://foo:1234/bar", "Ports are unsupported with chrome scheme"),
|
||||||
|
|
||||||
|
# Additional tests
|
||||||
|
("http://[", "Invalid IPv6 URL"),
|
||||||
])
|
])
|
||||||
def test_invalid_patterns(pattern, error):
|
def test_invalid_patterns(pattern, error):
|
||||||
with pytest.raises(urlmatch.ParseError, match=error):
|
with pytest.raises(urlmatch.ParseError, match=error):
|
||||||
|
Loading…
Reference in New Issue
Block a user