summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorFredrik Lundh <fredrik@pythonware.com>2000-09-24 14:46:23 (GMT)
committerFredrik Lundh <fredrik@pythonware.com>2000-09-24 14:46:23 (GMT)
commit19f977ba402acb44e7fcae8a7fe2dc37e3e36eca (patch)
tree2290ed4e98452381416d553eb612727525b7b2da /Lib/test
parent96753b348219ffc6c24eeb4316d6ba203ac09ad5 (diff)
downloadcpython-19f977ba402acb44e7fcae8a7fe2dc37e3e36eca.zip
cpython-19f977ba402acb44e7fcae8a7fe2dc37e3e36eca.tar.gz
cpython-19f977ba402acb44e7fcae8a7fe2dc37e3e36eca.tar.bz2
- don't hang if group id is followed by whitespace (closes bug #114660)
Diffstat (limited to 'Lib/test')
-rwxr-xr-xLib/test/re_tests.py1
-rw-r--r--Lib/test/test_sre.py3
2 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/re_tests.py b/Lib/test/re_tests.py
index 7eac04c..3a25d51 100755
--- a/Lib/test/re_tests.py
+++ b/Lib/test/re_tests.py
@@ -1,6 +1,5 @@
#!/usr/bin/env python
# -*- mode: python -*-
-# $Id$
# Re test suite and benchmark suite v1.5
diff --git a/Lib/test/test_sre.py b/Lib/test/test_sre.py
index d3e9dbe..373efa0 100644
--- a/Lib/test/test_sre.py
+++ b/Lib/test/test_sre.py
@@ -114,6 +114,9 @@ test(r"""sre.sub(r'^\s*', 'X', 'test')""", 'Xtest')
test(r"""sre.sub(r'a', 'b', 'aaaaa')""", 'bbbbb')
test(r"""sre.sub(r'a', 'b', 'aaaaa', 1)""", 'baaaa')
+# bug 114660
+test(r"""sre.sub(r'(\S)\s+(\S)', r'\1 \2', 'hello there')""", 'hello there')
+
if verbose:
print 'Running tests on symbolic references'