sre.split should return the last segment, even if empty

(sorry, barry)
This commit is contained in:
Fredrik Lundh 2001-10-22 06:01:56 +00:00
parent 5c66a26dee
commit f864aa8fd9
2 changed files with 11 additions and 11 deletions

View file

@ -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'])