[Python-checkins] CVS: python/dist/src/Lib/test test_sre.py,1.14,1.15
Fredrik Lundh
python-dev@python.org
Sun, 14 Jan 2001 07:06:14 -0800
- Previous message: [Python-checkins] CVS: python/dist/src/Modules _sre.c,2.47,2.48 sre_constants.h,2.9,2.10
- Next message: [Python-checkins] CVS: python/dist/src/Lib sre.py,1.25,1.26 sre_compile.py,1.31,1.32 sre_parse.py,1.38,1.39 sre_constants.py,1.21,1.22
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv26795/Lib/test
Modified Files:
test_sre.py
Log Message:
SRE fixes for 2.1 alpha:
-- added some more docstrings
-- fixed typo in scanner class (#125531)
-- the multiline flag (?m) should't affect the \Z operator (#127259)
-- fixed non-greedy backtracking bug (#123769, #127259)
-- added sre.DEBUG flag (currently dumps the parsed pattern structure)
-- fixed a couple of glitches in groupdict (the #126587 memory leak
had already been fixed by AMK)
Index: test_sre.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_sre.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** test_sre.py 2000/12/12 23:11:42 1.14
--- test_sre.py 2001/01/14 15:06:11 1.15
***************
*** 48,57 ****
for i in [0, 8, 16, 32, 64, 127, 128, 255]:
! test(r"""sre.match(r"\%03o" % i, chr(i)) is not None""", 1)
! test(r"""sre.match(r"\%03o0" % i, chr(i)+"0") is not None""", 1)
! test(r"""sre.match(r"\%03o8" % i, chr(i)+"8") is not None""", 1)
! test(r"""sre.match(r"\x%02x" % i, chr(i)) is not None""", 1)
! test(r"""sre.match(r"\x%02x0" % i, chr(i)+"0") is not None""", 1)
! test(r"""sre.match(r"\x%02xz" % i, chr(i)+"z") is not None""", 1)
test(r"""sre.match("\911", "")""", None, sre.error)
--- 48,57 ----
for i in [0, 8, 16, 32, 64, 127, 128, 255]:
! test(r"""sre.match(r"\%03o" % i, chr(i)) != None""", 1)
! test(r"""sre.match(r"\%03o0" % i, chr(i)+"0") != None""", 1)
! test(r"""sre.match(r"\%03o8" % i, chr(i)+"8") != None""", 1)
! test(r"""sre.match(r"\x%02x" % i, chr(i)) != None""", 1)
! test(r"""sre.match(r"\x%02x0" % i, chr(i)+"0") != None""", 1)
! test(r"""sre.match(r"\x%02xz" % i, chr(i)+"z") != None""", 1)
test(r"""sre.match("\911", "")""", None, sre.error)
***************
*** 198,206 ****
for i in range(0, 256):
p = p + chr(i)
! test(r"""sre.match(sre.escape(chr(i)), chr(i)) is not None""", 1)
test(r"""sre.match(sre.escape(chr(i)), chr(i)).span()""", (0,1))
pat = sre.compile(sre.escape(p))
! test(r"""pat.match(p) is not None""", 1)
test(r"""pat.match(p).span()""", (0,256))
--- 198,206 ----
for i in range(0, 256):
p = p + chr(i)
! test(r"""sre.match(sre.escape(chr(i)), chr(i)) != None""", 1)
test(r"""sre.match(sre.escape(chr(i)), chr(i)).span()""", (0,1))
pat = sre.compile(sre.escape(p))
! test(r"""pat.match(p) != None""", 1)
test(r"""pat.match(p).span()""", (0,256))
- Previous message: [Python-checkins] CVS: python/dist/src/Modules _sre.c,2.47,2.48 sre_constants.h,2.9,2.10
- Next message: [Python-checkins] CVS: python/dist/src/Lib sre.py,1.25,1.26 sre_compile.py,1.31,1.32 sre_parse.py,1.38,1.39 sre_constants.py,1.21,1.22
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]