summaryrefslogtreecommitdiffstatshomepage
path: root/tests
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-01-22 22:40:02 +0200
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-01-22 22:48:25 +0200
commit0b7184dcb8250e6654e55174753b24e4cbfea052 (patch)
tree75229c77857a3cd0cb7026de86d60556e9f48b03 /tests
parent0914371faf29d2f4b7fdee8001e77847b130542b (diff)
downloadmicropython-0b7184dcb8250e6654e55174753b24e4cbfea052.tar.gz
micropython-0b7184dcb8250e6654e55174753b24e4cbfea052.zip
Implement octal and hex escapes in strings.
Diffstat (limited to 'tests')
-rw-r--r--tests/basics/string-escape.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/basics/string-escape.py b/tests/basics/string-escape.py
new file mode 100644
index 0000000000..000a8713e6
--- /dev/null
+++ b/tests/basics/string-escape.py
@@ -0,0 +1,11 @@
+a = "a\1b"
+print(len(a))
+print(ord(a[1]))
+print(len("a\123b"))
+a = "a\12345b"
+print(len(a))
+print(ord(a[1]))
+
+a = "a\xffb"
+print(len(a))
+print(ord(a[1]))