From f864aa8fd9afc1410dd7dc4d147c3bd8b7d5342a Mon Sep 17 00:00:00 2001 From: Fredrik Lundh Date: Mon, 22 Oct 2001 06:01:56 +0000 Subject: sre.split should return the last segment, even if empty (sorry, barry) --- Lib/test/test_sre.py | 1 + 1 file changed, 1 insertion(+) (limited to 'Lib/test/test_sre.py') diff --git a/Lib/test/test_sre.py b/Lib/test/test_sre.py index e8791519d5..75a168cb9c 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']) -- cgit v1.2.1