From bcdffe53c641ad5832f06cd544f29e3cdd522829 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Fri, 30 May 2014 03:07:05 +0300 Subject: objstr: *strip(): Fix handling of one-char subject strings. --- tests/basics/string_strip.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests') diff --git a/tests/basics/string_strip.py b/tests/basics/string_strip.py index 4684c2a24..70c74b383 100644 --- a/tests/basics/string_strip.py +++ b/tests/basics/string_strip.py @@ -20,3 +20,14 @@ try: print('mississippi'.rstrip(b'ipz')) except TypeError: print("TypeError") + +# single-char subj string used to give a problem +print("a".strip()) +print("a".lstrip()) +print("a".rstrip()) +print(" a".strip()) +print(" a".lstrip()) +print(" a".rstrip()) +print("a ".strip()) +print("a ".lstrip()) +print("a ".rstrip()) -- cgit v1.2.3