summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_re.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2023-08-07 15:09:56 (GMT)
committerGitHub <noreply@github.com>2023-08-07 15:09:56 (GMT)
commited64204716035db58c7e11b78182596aa2d97176 (patch)
tree3b21b42919fef0eb14bd504d53b4da2a174e9d4c /Lib/test/test_re.py
parent50e3cc9748eb2103eb7ed6cc5a74d177df3cfb13 (diff)
downloadcpython-ed64204716035db58c7e11b78182596aa2d97176.zip
cpython-ed64204716035db58c7e11b78182596aa2d97176.tar.gz
cpython-ed64204716035db58c7e11b78182596aa2d97176.tar.bz2
gh-106566: Optimize (?!) in regular expressions (GH-106567)
Diffstat (limited to 'Lib/test/test_re.py')
-rw-r--r--Lib/test/test_re.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py
index a6f5af1..a565cbe 100644
--- a/Lib/test/test_re.py
+++ b/Lib/test/test_re.py
@@ -2362,6 +2362,9 @@ class ReTests(unittest.TestCase):
p.terminate()
p.join()
+ def test_fail(self):
+ self.assertEqual(re.search(r'12(?!)|3', '123')[0], '3')
+
def get_debug_out(pat):
with captured_stdout() as out: