Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13304 Modified Files: Tag: release23-maint test_re.py Log Message: For reference, add tests for PCRE fix; the tests aren't run by default because I wanted to minimize upheaval to the 2.3 test suite Index: test_re.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_re.py,v retrieving revision 1.45.6.3 retrieving revision 1.45.6.4 diff -u -d -r1.45.6.3 -r1.45.6.4 --- test_re.py 20 Apr 2004 21:32:33 -0000 1.45.6.3 +++ test_re.py 31 Aug 2005 12:56:50 -0000 1.45.6.4 @@ -497,6 +497,23 @@ self.assert_(re.compile('bug_926075') is not re.compile(eval("u'bug_926075'"))) +class PreTests(unittest.TestCase): + def test_can_2005_2491(self): + import pre + # min < 0 + self.assertRaises(pre.error, pre.compile, 'a{4544564564646450,}') + # min > 65535 + self.assertRaises(pre.error, pre.compile, + 'a{1231313134536434,}') + # max < 0 + self.assertRaises(pre.error, pre.compile, + 'a{12,4544564564646450}') + # max > 65535 + self.assertRaises(pre.error, pre.compile, + 'a{12,1231313134536434}') + self.assertRaises(pre.error, pre.compile, + 'a{32,14}') + def run_re_tests(): from test.re_tests import benchmarks, tests, SUCCEED, FAIL, SYNTAX_ERROR if verbose: @@ -623,6 +640,7 @@ def test_main(): run_unittest(ReTests) + #run_unittest(PreTests) run_re_tests() if __name__ == "__main__":