Skip to content

Commit 6f7dd71

Browse files
committed
test: Add additional test cases
1 parent d30f0a9 commit 6f7dd71

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

builtin/tests/builtin.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
doc="ascii"
2323
assert ascii('hello world') == "'hello world'"
2424
assert ascii('안녕 세상') == "'\\uc548\\ub155 \\uc138\\uc0c1'"
25+
assert ascii('\\') == "'\\\\'"
26+
assert ascii('\t\r\n') == "'\\t\\r\\n'"
27+
assert ascii("\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F") == "'\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
2528

2629
doc="chr"
2730
assert chr(65) == "A"

0 commit comments

Comments
 (0)