summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_sre.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_sre.py')
-rw-r--r--Lib/test/test_sre.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_sre.py b/Lib/test/test_sre.py
index 8442258..49fe4c6 100644
--- a/Lib/test/test_sre.py
+++ b/Lib/test/test_sre.py
@@ -123,6 +123,10 @@ test(r"""sre.sub('\r\n', r'\n', 'abc\r\ndef\r\n')""", 'abc\ndef\n')
test(r"""sre.sub(r'\r\n', '\n', 'abc\r\ndef\r\n')""", 'abc\ndef\n')
test(r"""sre.sub('\r\n', '\n', 'abc\r\ndef\r\n')""", 'abc\ndef\n')
+# Test for empty sub() behaviour, see SF bug #462270
+test(r"""sre.sub('x*', '-', 'abxd')""", '-a-b-d-')
+test(r"""sre.sub('x+', '-', 'abxd')""", 'ab-d')
+
if verbose:
print 'Running tests on symbolic references'