summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorFredrik Lundh <fredrik@pythonware.com>2000-10-03 19:22:26 (GMT)
committerFredrik Lundh <fredrik@pythonware.com>2000-10-03 19:22:26 (GMT)
commitd11b5e54f0e9ac51fbb49ebe5f1fc0626d59fc55 (patch)
tree80b6cae9c4cc386143ac9c395a985e981e0cded5 /Lib/test
parent4ae8ef84da19892b828b9649a9565e967be4c0bd (diff)
downloadcpython-d11b5e54f0e9ac51fbb49ebe5f1fc0626d59fc55.zip
cpython-d11b5e54f0e9ac51fbb49ebe5f1fc0626d59fc55.tar.gz
cpython-d11b5e54f0e9ac51fbb49ebe5f1fc0626d59fc55.tar.bz2
Recompile pattern if (?x) flag was found inside the pattern during the
first scan. Closes bug #115040.
Diffstat (limited to 'Lib/test')
-rwxr-xr-xLib/test/re_tests.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/re_tests.py b/Lib/test/re_tests.py
index bb72f3d..8675224 100755
--- a/Lib/test/re_tests.py
+++ b/Lib/test/re_tests.py
@@ -612,9 +612,11 @@ xyzabc
(r'(([a-z]+):)?([a-z]+)$', 'smil', SUCCEED, 'g1+"-"+g2+"-"+g3', 'None-None-smil'),
# bug 111869 (PRE/PCRE fails on this one, SRE doesn't)
(r'.*d', 'abc\nabd', SUCCEED, 'found', 'abd'),
- # bug 112468
+ # bug 112468: various expected syntax errors
('(', '', SYNTAX_ERROR),
('[\\41]', '!', SUCCEED, 'found', '!'),
- # bug 115618
+ # bug 115040: rescan if flags are modified inside pattern
+ (r' (?x)foo ', 'foo', SUCCEED, 'found', 'foo'),
+ # bug 115618: negative lookahead
(r'(?<!abc)(d.f)', 'abcdefdof', SUCCEED, 'found', 'dof'),
]