[pypy-svn] r53561 - pypy/dist/pypy/rlib/parsing/test

jared.grubb at codespeak.net jared.grubb at codespeak.net
Tue Apr 8 04:16:08 CEST 2008


Author: jared.grubb
Date: Tue Apr  8 04:16:06 2008
New Revision: 53561

Modified:
   pypy/dist/pypy/rlib/parsing/test/pcre_test_7.py
   pypy/dist/pypy/rlib/parsing/test/test_pcre_regtest.py
Log:
Test_pcre_regtest.py: removed the failing tests (they use syntax and expectations not supported by our regex implementation); enabled the tests as part of the regression test runs

Modified: pypy/dist/pypy/rlib/parsing/test/pcre_test_7.py
==============================================================================
--- pypy/dist/pypy/rlib/parsing/test/pcre_test_7.py	(original)
+++ pypy/dist/pypy/rlib/parsing/test/pcre_test_7.py	Tue Apr  8 04:16:06 2008
@@ -1,3 +1,16 @@
+# The following file was auto-generated, but has been edited to remove tests that 
+# do not pass; we have verified that they should NOT pass, due to our interpretation
+# of regex formats. The tests were removed for the following reasons (which were not
+# easily recognizable during the parsing and creation of this file):
+#   1)  In PCRE, '.' matches any character except \n. We define '.' as matching any
+#       character at all.
+#   2)  In PCRE, '\n' at the end of a line is ignored for matches on regex like 'a$'.
+#       Our implementation does not actually implement $ or ^, but we fake it by
+#       restricting the substrings that we test. Therefore, we cannot properly fake
+#       these cases.
+#   3)  The expression "^a|b" contains two tests "^a" or "b". The ^ only binds to
+#       the first group; we fake $ and ^ as it is, so we will not pass this test.
+
 # Auto-generated file of regular expressions from PCRE library
 
 # The PCRE library is distributed under the BSD license. We have borrowed some
@@ -81,8 +94,8 @@
 suite.append(['x\\dy\\Dz', '', [('x9yzz', 'x9yzz'), ('x0y+z', 'x0y+z'), ('*** Failers', None), ('xyz', None), ('xxy0z', None)]])
 suite.append(['x\\sy\\Sz', '', [('x yzz', 'x yzz'), ('x y+z', 'x y+z'), ('*** Failers', None), ('xyz', None), ('xxyyz', None)]])
 suite.append(['x\\wy\\Wz', '', [('xxy+z', 'xxy+z'), ('*** Failers', None), ('xxy0z', None), ('x+y+z', None)]])
-suite.append(['x.y', '', [('x+y', 'x+y'), ('x-y', 'x-y'), ('*** Failers', None), ('x\ny', None)]])
-suite.append(['a\\d$', '', [('ba0', 'a0'), ('ba0\n', 'a0'), ('*** Failers', None), ('ba0\ncd', None)]])
+suite.append(['x.y', '', [('x+y', 'x+y'), ('x-y', 'x-y')]])  #  MANUALLY REMOVED TESTS: , ('*** Failers', None), ('x\ny', None)]])
+suite.append(['a\\d$', '', [('ba0', 'a0')]])  #  MANUALLY REMOVED TESTS: , ('ba0\n', 'a0'), ('*** Failers', None), ('ba0\ncd', None)]])
 suite.append(['[^a]', '', [('abcd', 'b')]])
 suite.append(['ab?\\w', '', [('abz', 'abz'), ('abbz', 'abb'), ('azz', 'az')]])
 suite.append(['x{0,3}yz', '', [('ayzq', 'yz'), ('axyzq', 'xyz'), ('axxyz', 'xxyz'), ('axxxyzq', 'xxxyz'), ('axxxxyzq', 'xxxyz'), ('*** Failers', None), ('ax', None), ('axx', None)]])
@@ -115,7 +128,7 @@
 suite.append(['^(a*\\w|ab)=(a*\\w|ab)', '', [('ab=ab', 'ab=ab')]])
 suite.append(['^abc', '', [('abcdef', 'abc'), ('*** Failers', None)]])
 suite.append(['^(a*|xyz)', '', [('bcd', ''), ('aaabcd', 'aaa'), ('xyz', 'xyz'), ('*** Failers', '')]])
-suite.append(['xyz$', '', [('xyz', 'xyz'), ('xyz\n', 'xyz'), ('*** Failers', None)]])
+suite.append(['xyz$', '', [('xyz', 'xyz')]]) #  MANUALLY REMOVED TESTS:  , ('xyz\n', 'xyz'), ('*** Failers', None)]])
 suite.append(['^abcdef', '', [('*** Failers', None)]])
 suite.append(['^a{2,4}\\d+z', '', [('*** Failers', None)]])
 suite.append(['the quick brown fox', '', [('the quick brown fox', 'the quick brown fox'), ('The quick brown FOX', None), ('What do you know about the quick brown fox?', 'the quick brown fox'), ('What do you know about THE QUICK BROWN FOX?', None)]])
@@ -172,7 +185,7 @@
 suite.append(['ab{3,cd', '', [('ab{3,cd', 'ab{3,cd')]])
 suite.append(['ab{3,4a}cd', '', [('ab{3,4a}cd', 'ab{3,4a}cd')]])
 suite.append(['{4,5a}bc', '', [('{4,5a}bc', '{4,5a}bc')]])
-suite.append(['abc$', '', [('abc', 'abc'), ('abc\n', 'abc'), ('*** Failers', None), ('abc\ndef', None)]])
+suite.append(['abc$', '', [('abc', 'abc')]])  #  MANUALLY REMOVED TESTS: ('abc\n', 'abc'), ('*** Failers', None), ('abc\ndef', None)]])
 suite.append(['(abc)\\223', '', [('abc\x93', 'abc\x93')]])
 suite.append(['(abc)\\323', '', [('abc\xd3', 'abc\xd3')]])
 suite.append(['ab\\idef', '', [('abidef', 'abidef')]])
@@ -206,11 +219,11 @@
 suite.append(['^(a){1,2}', '', [('bcd', None), ('abc', 'a'), ('aab', 'aa')]])
 suite.append(['^(a){1,3}', '', [('bcd', None), ('abc', 'a'), ('aab', 'aa'), ('aaa', 'aaa')]])
 suite.append(['^(a){1,}', '', [('bcd', None), ('abc', 'a'), ('aab', 'aa'), ('aaa', 'aaa'), ('aaaaaaaa', 'aaaaaaaa')]])
-suite.append(['.*\\.gif', '', [('borfle\nbib.gif\nno', 'bib.gif')]])
-suite.append(['.{0,}\\.gif', '', [('borfle\nbib.gif\nno', 'bib.gif')]])
-suite.append(['.*$', '', [('borfle\nbib.gif\nno', 'no')]])
-suite.append(['.*$', '', [('borfle\nbib.gif\nno\n', 'no')]])
-suite.append(['^.*B', '', [('**** Failers', None), ('abc\nB', None)]])
+#  MANUALLY REMOVED TESTS:  suite.append(['.*\\.gif', '', [('borfle\nbib.gif\nno', 'bib.gif')]])
+#  MANUALLY REMOVED TESTS:  suite.append(['.{0,}\\.gif', '', [('borfle\nbib.gif\nno', 'bib.gif')]])
+#  MANUALLY REMOVED TESTS:  suite.append(['.*$', '', [('borfle\nbib.gif\nno', 'no')]])
+#  MANUALLY REMOVED TESTS:  suite.append(['.*$', '', [('borfle\nbib.gif\nno\n', 'no')]])
+#  MANUALLY REMOVED TESTS:  suite.append(['^.*B', '', [('**** Failers', None), ('abc\nB', None)]])
 suite.append(['^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]', '', [('123456654321', '123456654321')]])
 suite.append(['^\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d', '', [('123456654321', '123456654321')]])
 suite.append(['^[\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d]', '', [('123456654321', '123456654321')]])
@@ -225,7 +238,7 @@
 suite.append(['ab\\d{0}e', '', [('abe', 'abe'), ('*** Failers', None), ('ab1e', None)]])
 suite.append(['"([^\\\\"]+|\\\\.)*"', '', [('the "quick" brown fox', '"quick"'), ('"the \\"quick\\" brown fox"', '"the \\"quick\\" brown fox"')]])
 suite.append(['a[^a]b', '', [('acb', 'acb'), ('a\nb', 'a\nb')]])
-suite.append(['a.b', '', [('acb', 'acb'), ('*** Failers', None), ('a\nb', None)]])
+suite.append(['a.b', '', [('acb', 'acb')]])  #  MANUALLY REMOVED TESTS: , ('*** Failers', None), ('a\nb', None)]])
 suite.append(['\\x00{ab}', '', [('\x00{ab}', '\x00{ab}')]])
 suite.append(['(A|B)*CD', '', [('CD', 'CD')]])
 suite.append(['(\\d+)(\\w)', '', [('12345a', '12345a'), ('12345+', '12345')]])
@@ -317,7 +330,7 @@
 suite.append(['(ab|a)b*c', '', [('abc', 'abc')]])
 suite.append(['((a)(b)c)(d)', '', [('abcd', 'abcd')]])
 suite.append(['[a-zA-Z_][a-zA-Z0-9_]*', '', [('alpha', 'alpha')]])
-suite.append(['^a(bc+|b[eh])g|.h$', '', [('abh', 'bh')]])
+#  MANUALLY REMOVED TESTS:  suite.append(['^a(bc+|b[eh])g|.h$', '', [('abh', 'bh')]])
 suite.append(['(bc+d$|ef*g.|h?i(j|k))', '', [('effgz', 'effgz'), ('ij', 'ij'), ('reffgz', 'effgz'), ('*** Failers', None), ('effg', None), ('bcdd', None)]])
 suite.append(['((((((((((a))))))))))', '', [('a', 'a')]])
 suite.append(['(((((((((a)))))))))', '', [('a', 'a')]])
@@ -367,4 +380,4 @@
 suite.append(['^(a()*)*', '', [('aaaa', 'aaaa')]])
 suite.append(['^(a()+)+', '', [('aaaa', 'aaaa')]])
 suite.append(['(a|)*\\d', '', [('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', None), ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4')]])
-suite.append(['.+foo', '', [('afoo', 'afoo'), ('** Failers', None), ('\r\nfoo', None), ('\nfoo', None)]])
+suite.append(['.+foo', '', [('afoo', 'afoo')]])    #  MANUALLY REMOVED TESTS:, ('** Failers', None), ('\r\nfoo', None), ('\nfoo', None)]])

Modified: pypy/dist/pypy/rlib/parsing/test/test_pcre_regtest.py
==============================================================================
--- pypy/dist/pypy/rlib/parsing/test/test_pcre_regtest.py	(original)
+++ pypy/dist/pypy/rlib/parsing/test/test_pcre_regtest.py	Tue Apr  8 04:16:06 2008
@@ -85,7 +85,7 @@
 import string
 import re
 
-py.test.skip("Still in progress")
+#py.test.skip("Still in progress")
 
 # Dumper's are objects that can dump/load the suite
 class Dumper(object):



More information about the Pypy-commit mailing list