tests: Add missing tests for builtins, and many other things.
This commit is contained in:
@@ -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))
|
||||
|
||||
5
tests/unicode/unicode_chr.py
Normal file
5
tests/unicode/unicode_chr.py
Normal file
@@ -0,0 +1,5 @@
|
||||
# test builtin chr with unicode characters
|
||||
|
||||
print(chr(945))
|
||||
print(chr(0x800))
|
||||
print(chr(0x10000))
|
||||
3
tests/unicode/unicode_ord.py
Normal file
3
tests/unicode/unicode_ord.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# test builtin ord with unicode characters
|
||||
|
||||
print(ord('α'))
|
||||
Reference in New Issue
Block a user