aboutsummaryrefslogtreecommitdiff
path: root/tests/unicode
diff options
context:
space:
mode:
authorDamien George2015-04-04 22:05:30 +0100
committerDamien George2015-04-04 22:05:30 +0100
commit9dd36404646f857c4f250537bac0d9a8ad041d25 (patch)
treec6509bcd3c7d5c2e67332110c582df2b5a5c669f /tests/unicode
parent7e758b1cf878312cab5d9d2825b36e7235ea10a3 (diff)
tests: Add missing tests for builtins, and many other things.
Diffstat (limited to 'tests/unicode')
-rw-r--r--tests/unicode/unicode.py4
-rw-r--r--tests/unicode/unicode_chr.py5
-rw-r--r--tests/unicode/unicode_ord.py3
3 files changed, 12 insertions, 0 deletions
diff --git a/tests/unicode/unicode.py b/tests/unicode/unicode.py
index c7e523f06..57075f7e3 100644
--- a/tests/unicode/unicode.py
+++ b/tests/unicode/unicode.py
@@ -16,3 +16,7 @@ for i in range(-len(s), len(s)):
# Test UTF-8 encode and decode
enc = s.encode()
print(enc, enc.decode() == s)
+
+# printing of unicode chars using repr
+# TODO we don't do this correctly
+#print(repr(s))
diff --git a/tests/unicode/unicode_chr.py b/tests/unicode/unicode_chr.py
new file mode 100644
index 000000000..248eb5892
--- /dev/null
+++ b/tests/unicode/unicode_chr.py
@@ -0,0 +1,5 @@
+# test builtin chr with unicode characters
+
+print(chr(945))
+print(chr(0x800))
+print(chr(0x10000))
diff --git a/tests/unicode/unicode_ord.py b/tests/unicode/unicode_ord.py
new file mode 100644
index 000000000..47cfa1c2d
--- /dev/null
+++ b/tests/unicode/unicode_ord.py
@@ -0,0 +1,3 @@
+# test builtin ord with unicode characters
+
+print(ord('α'))