summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_re.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-11-20 21:35:53 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2012-11-20 21:35:53 (GMT)
commita34412a992e5d375a37499c36957448f6b1059ba (patch)
treea77d574bdf4476e2bfc47eba855eac73a3e4d8ff /Lib/test/test_re.py
parent82c1c781c7ee6496bd4c404b7ba972eed5dbcb12 (diff)
parent39bdad813a2f07bd8c373e2c88b76467ef12832c (diff)
downloadcpython-a34412a992e5d375a37499c36957448f6b1059ba.zip
cpython-a34412a992e5d375a37499c36957448f6b1059ba.tar.gz
cpython-a34412a992e5d375a37499c36957448f6b1059ba.tar.bz2
Merge test from issue #1160.
Diffstat (limited to 'Lib/test/test_re.py')
-rw-r--r--Lib/test/test_re.py6
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")