mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
sre.split should return the last segment, even if empty
(sorry, barry)
This commit is contained in:
parent
5c66a26dee
commit
f864aa8fd9
2 changed files with 11 additions and 11 deletions
|
@ -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'])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue