summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-03-22 22:17:52 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-03-22 22:17:52 +0300
commit4a4bb84e9216a130050a13e20a19fbf476ed6e6c (patch)
tree6088b21c78a42a7b7e9b5dcf03c3beb05d41e916
parent58f23def55a705357b352ce8af642e03cd5c49f0 (diff)
downloadmicropython-4a4bb84e9216a130050a13e20a19fbf476ed6e6c.tar.gz
micropython-4a4bb84e9216a130050a13e20a19fbf476ed6e6c.zip
tests/heapalloc_str: Test no-replacement case for str.replace().
-rw-r--r--tests/micropython/heapalloc_str.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/micropython/heapalloc_str.py b/tests/micropython/heapalloc_str.py
index 0df39d3c0c..39aa56ccd7 100644
--- a/tests/micropython/heapalloc_str.py
+++ b/tests/micropython/heapalloc_str.py
@@ -3,6 +3,7 @@ import micropython
micropython.heap_lock()
+# Concatenating empty string returns original string
b"" + b""
b"" + b"1"
b"2" + b""
@@ -11,4 +12,7 @@ b"2" + b""
"" + "1"
"2" + ""
+# If no replacements done, returns original string
+"foo".replace(",", "_")
+
micropython.heap_unlock()