summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorFredrik Lundh <fredrik@pythonware.com>2001-10-22 06:01:56 (GMT)
committerFredrik Lundh <fredrik@pythonware.com>2001-10-22 06:01:56 (GMT)
commitf864aa8fd9afc1410dd7dc4d147c3bd8b7d5342a (patch)
tree95b14e0eaf17181939bc88f9d0d4d529ba560736 /Lib
parent5c66a26dee41853a9ce43b75965cc16b8e34aef0 (diff)
downloadcpython-f864aa8fd9afc1410dd7dc4d147c3bd8b7d5342a.zip
cpython-f864aa8fd9afc1410dd7dc4d147c3bd8b7d5342a.tar.gz
cpython-f864aa8fd9afc1410dd7dc4d147c3bd8b7d5342a.tar.bz2
sre.split should return the last segment, even if empty
(sorry, barry)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_sre.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_sre.py b/Lib/test/test_sre.py
index e879151..75a168c 100644
--- a/Lib/test/test_sre.py
+++ b/Lib/test/test_sre.py
@@ -155,6 +155,7 @@ if verbose:
print 'Running tests on sre.split'
test(r"""sre.split(r":", ":a:b::c")""", ['', 'a', 'b', '', 'c'])
+test(r"""sre.split(r":+", ":a:b:::")""", ['', 'a', 'b', ''])
test(r"""sre.split(r":*", ":a:b::c")""", ['', 'a', 'b', 'c'])
test(r"""sre.split(r"(:*)", ":a:b::c")""", ['', ':', 'a', ':', 'b', '::', 'c'])
test(r"""sre.split(r"(?::*)", ":a:b::c")""", ['', 'a', 'b', 'c'])