an SRE bugfix a day keeps Guido away...

#462270: sub-tle difference between pre.sub and sre.sub.  PRE ignored
an empty match at the previous location, SRE didn't.

also synced with Secret Labs "sreopen" codebase.
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'\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'