summaryrefslogtreecommitdiffstats
path: root/tests/encoding.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/encoding.test')
-rw-r--r--tests/encoding.test16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/encoding.test b/tests/encoding.test
index ed0e6a4..cf27190 100644
--- a/tests/encoding.test
+++ b/tests/encoding.test
@@ -328,6 +328,22 @@ test encoding-15.3 {UtfToUtfProc null character input} {
binary scan [encoding convertto identity $y] H* z
list [string bytelength $x] [string bytelength $y] $z
} {1 2 c080}
+test encoding-15.4 {UtfToUtfProc emoji character input} {
+ set x \xED\xA0\xBD\xED\xB8\x82
+ set y [encoding convertfrom utf-8 \xED\xA0\xBD\xED\xB8\x82]
+ list [string length $x] [string length $y] $y
+} "6 2 \uD83D\uDE02"
+test encoding-15.5 {UtfToUtfProc emoji character input} {
+ set x \xF0\x9F\x98\x82
+ set y [encoding convertfrom utf-8 \xF0\x9F\x98\x82]
+ list [string length $x] [string length $y] $y
+} "4 2 \uD83D\uDE02"
+test encoding-15.6 {UtfToUtfProc emoji character output} {
+ set x \uD83D\uDE02
+ set y [encoding convertto utf-8 \uD83D\uDE02]
+ binary scan $y H* z
+ list [string length $x] [string length $y] $z
+} {2 4 f09f9882}
test encoding-16.1 {UnicodeToUtfProc} {
set val [encoding convertfrom unicode NN]