Ticket #8725: regex_helper_r8761_with_test.diff

File regex_helper_r8761_with_test.diff, 1.2 KB (added by Carl Meyer, 16 years ago)

added regression test to patch

  • django/utils/regex_helper.py

     
    7474    # A "while" loop is used here because later on we need to be able to peek
    7575    # at the next character and possibly go around without consuming another
    7676    # one at the top of the loop.
    77     ch, escaped = pattern_iter.next()
    7877    try:
     78        ch, escaped = pattern_iter.next()
    7979        while True:
    8080            if escaped:
    8181                result.append(ch)
  • tests/regressiontests/urlpatterns_reverse/urls.py

     
    4040    url(r'^(?i)test/2/?$', empty_view, name="test2"),
    4141    url(r'^outer/(?P<outer>\d+)/',
    4242            include('regressiontests.urlpatterns_reverse.included_urls')),
     43    url(r'', empty_view, name='emptyregex'),
    4344
    4445    # This is non-reversible, but we shouldn't blow up when parsing it.
    4546    url(r'^(?:foo|bar)(\w+)/$', empty_view, name="disjunction"),
Back to Top