summaryrefslogtreecommitdiff
path: root/tests/validators/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/validators/tests.py')
-rw-r--r--tests/validators/tests.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/validators/tests.py b/tests/validators/tests.py
index 36d0b2a520..012b098f4e 100644
--- a/tests/validators/tests.py
+++ b/tests/validators/tests.py
@@ -222,9 +222,15 @@ TEST_DATA = [
(URLValidator(EXTENDED_SCHEMES), 'git+ssh://git@github.com/example/hg-git.git', None),
(URLValidator(EXTENDED_SCHEMES), 'git://-invalid.com', ValidationError),
- # Trailing newlines not accepted
+ # Newlines and tabs are not accepted.
(URLValidator(), 'http://www.djangoproject.com/\n', ValidationError),
(URLValidator(), 'http://[::ffff:192.9.5.5]\n', ValidationError),
+ (URLValidator(), 'http://www.djangoproject.com/\r', ValidationError),
+ (URLValidator(), 'http://[::ffff:192.9.5.5]\r', ValidationError),
+ (URLValidator(), 'http://www.django\rproject.com/', ValidationError),
+ (URLValidator(), 'http://[::\rffff:192.9.5.5]', ValidationError),
+ (URLValidator(), 'http://\twww.djangoproject.com/', ValidationError),
+ (URLValidator(), 'http://\t[::ffff:192.9.5.5]', ValidationError),
# Trailing junk does not take forever to reject
(URLValidator(), 'http://www.asdasdasdasdsadfm.com.br ', ValidationError),
(URLValidator(), 'http://www.asdasdasdasdsadfm.com.br z', ValidationError),