mirror of
https://github.com/django/django.git
synced 2025-10-24 22:26:08 +00:00
[1.11.x] Fixed #27781 -- Made simplify_regex() remove outstanding '?' characters.
Regression inf0ef0c49e9. Backport ofc37ec5a659from master
This commit is contained in:
committed by
Tim Graham
parent
7dda48bf18
commit
092f09fcc1
@@ -340,6 +340,7 @@ class AdminDocViewFunctionsTests(SimpleTestCase):
|
||||
(r'^(?P<a>(x|y))/b/(?P<c>\w+)$', '/<a>/b/<c>'),
|
||||
(r'^(?P<a>(x|y))/b/(?P<c>\w+)ab', '/<a>/b/<c>ab'),
|
||||
(r'^(?P<a>(x|y)(\(|\)))/b/(?P<c>\w+)ab', '/<a>/b/<c>ab'),
|
||||
(r'^a/?$', '/a/'),
|
||||
)
|
||||
for pattern, output in tests:
|
||||
self.assertEqual(simplify_regex(pattern), output)
|
||||
|
||||
Reference in New Issue
Block a user