summaryrefslogtreecommitdiff
path: root/tests/basics/string_strip.py
diff options
context:
space:
mode:
authorGlenn Ruben Bakke <glennbakke@gmail.com>2017-10-04 21:45:04 +0200
committerGlenn Ruben Bakke <glennbakke@gmail.com>2017-10-04 21:45:04 +0200
commitbcab2ba0a80297100919366add6bada140c6ed75 (patch)
tree5133218f4fc010d5688f006dbdd1e2f346a843f7 /tests/basics/string_strip.py
parent4468731e3d039a3f72ac25aa43e936cf5ebb3f78 (diff)
parentf869d6b2e339c04469c6c9ea3fb2fabd7bbb2d8c (diff)
ports/nrf: Upmerging port with upstream master
Diffstat (limited to 'tests/basics/string_strip.py')
-rw-r--r--tests/basics/string_strip.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/basics/string_strip.py b/tests/basics/string_strip.py
index 5d99a78e5..971a4aae5 100644
--- a/tests/basics/string_strip.py
+++ b/tests/basics/string_strip.py
@@ -32,6 +32,13 @@ print("a ".strip())
print("a ".lstrip())
print("a ".rstrip())
+# \0 used to give a problem
+
+print("\0abc\0".strip())
+print("\0abc\0".lstrip())
+print("\0abc\0".rstrip())
+print("\0abc\0".strip("\0"))
+
# Test that stripping unstrippable string returns original object
s = "abc"
print(id(s.strip()) == id(s))