Commit cf3407a5 authored by Stefan Behnel's avatar Stefan Behnel

extended test case

parent b900281b
...@@ -279,6 +279,10 @@ def startswith_start_end(unicode s, sub, start, end): ...@@ -279,6 +279,10 @@ def startswith_start_end(unicode s, sub, start, end):
True True
>>> startswith_start_end(text, 'b ', 1, 5) >>> startswith_start_end(text, 'b ', 1, 5)
'MATCH' 'MATCH'
>>> text.startswith('ab ', -1000, 5000)
True
>>> startswith_start_end(text, 'ab ', -1000, 5000)
'MATCH'
>>> text.startswith('b X', 1, 5) >>> text.startswith('b X', 1, 5)
False False
>>> startswith_start_end(text, 'b X', 1, 5) >>> startswith_start_end(text, 'b X', 1, 5)
...@@ -340,6 +344,11 @@ def endswith_start_end(unicode s, sub, start, end): ...@@ -340,6 +344,11 @@ def endswith_start_end(unicode s, sub, start, end):
>>> endswith_start_end(text, 'fsdf ', 10, len(text)-1) >>> endswith_start_end(text, 'fsdf ', 10, len(text)-1)
'NO MATCH' 'NO MATCH'
>>> text.endswith('fsdf ', -1000, 5000)
True
>>> endswith_start_end(text, 'fsdf ', -1000, 5000)
'MATCH'
>>> PY_VERSION < (2,5) or text.endswith(('fsd', 'fsdf'), 10, len(text)-1) >>> PY_VERSION < (2,5) or text.endswith(('fsd', 'fsdf'), 10, len(text)-1)
True True
>>> endswith_start_end(text, ('fsd', 'fsdf'), 10, len(text)-1) >>> endswith_start_end(text, ('fsd', 'fsdf'), 10, len(text)-1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment