diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-05-30 03:07:05 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-05-30 03:15:17 +0300 |
commit | bcdffe53c641ad5832f06cd544f29e3cdd522829 (patch) | |
tree | 53c6662e3bbf5aeb1895d3a9002f7c20611ecd2e /tests/basics | |
parent | 059f95b2cb11f39e7a46c56e3de250f3c739f3ac (diff) | |
download | micropython-bcdffe53c641ad5832f06cd544f29e3cdd522829.tar.gz micropython-bcdffe53c641ad5832f06cd544f29e3cdd522829.zip |
objstr: *strip(): Fix handling of one-char subject strings.
Diffstat (limited to 'tests/basics')
-rw-r--r-- | tests/basics/string_strip.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/basics/string_strip.py b/tests/basics/string_strip.py index 4684c2a248..70c74b3834 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()) |