Issue #19327: Fixed the working of regular expressions with too big charset.

This commit is contained in:
Serhiy Storchaka 2013-10-24 22:04:37 +03:00
commit 8b150ecfc9
4 changed files with 8 additions and 3 deletions

View file

@ -482,6 +482,9 @@ class ReTests(unittest.TestCase):
"\u2222").group(1), "\u2222")
self.assertEqual(re.match("([\u2222\u2223])",
"\u2222", re.UNICODE).group(1), "\u2222")
r = '[%s]' % ''.join(map(chr, range(256, 2**16, 255)))
self.assertEqual(re.match(r,
"\uff01", re.UNICODE).group(), "\uff01")
def test_big_codesize(self):
# Issue #1160