diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-11-20 21:37:04 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-11-20 21:37:04 (GMT) |
commit | a21020478e5ee10407a4e88d08e3196d6b578af7 (patch) | |
tree | 9a4c51a79d7182f946627ada56020790abe9e532 /Lib | |
parent | b72c10996e804413ebf0cb04ffc6e10f128b90c2 (diff) | |
parent | a34412a992e5d375a37499c36957448f6b1059ba (diff) | |
download | cpython-a21020478e5ee10407a4e88d08e3196d6b578af7.zip cpython-a21020478e5ee10407a4e88d08e3196d6b578af7.tar.gz cpython-a21020478e5ee10407a4e88d08e3196d6b578af7.tar.bz2 |
Merge test from issue #1160.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_re.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py index e7acbe1..19cfa04 100644 --- a/Lib/test/test_re.py +++ b/Lib/test/test_re.py @@ -419,6 +419,12 @@ class ReTests(unittest.TestCase): self.assertEqual(re.match("([\u2222\u2223])", "\u2222", re.UNICODE).group(1), "\u2222") + def test_big_codesize(self): + # Issue #1160 + r = re.compile('|'.join(('%d'%x for x in range(10000)))) + self.assertIsNotNone(r.match('1000')) + self.assertIsNotNone(r.match('9999')) + def test_anyall(self): self.assertEqual(re.match("a.b", "a\nb", re.DOTALL).group(0), "a\nb") |