1
0
mirror of https://github.com/janet-lang/janet synced 2025-10-14 23:37:40 +00:00

Change \UXXXXXXXX -> \UXXXXXX and check codepoint max.

No need to add two extra leading zeros, as the max unicode
codepoint is 0x10FFFF.
This commit is contained in:
Calvin Rose
2020-04-05 07:09:53 -05:00
parent 810ef7401c
commit 87ecdb8112
3 changed files with 9 additions and 5 deletions

View File

@@ -206,9 +206,9 @@
(def 🐮 :cow)
(assert (= (string "🐼" 🦊 🐮) "🐼foxcow") "emojis 🙉 :)")
(assert (not= 🦊 "🦊") "utf8 strings are not symbols and vice versa")
(assert (= "\U0001F637" "😷") "unicode escape 1")
(assert (= "\u2623" "\U00002623" "") "unicode escape 2")
(assert (= "\u24c2" "\U000024c2" "") "unicode escape 3")
(assert (= "\U01F637" "😷") "unicode escape 1")
(assert (= "\u2623" "\U002623" "") "unicode escape 2")
(assert (= "\u24c2" "\U0024c2" "") "unicode escape 3")
(assert (= "\u0061" "a") "unicode escape 4")
# Symbols with @ character