diff options
Diffstat (limited to 'tests/encoding.test')
-rw-r--r-- | tests/encoding.test | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/tests/encoding.test b/tests/encoding.test index 25d0827..c6f4e02 100644 --- a/tests/encoding.test +++ b/tests/encoding.test @@ -287,6 +287,12 @@ test encoding-11.8 {encoding: extended Unicode UTF-16} { test encoding-11.9 {encoding: extended Unicode UTF-16} { viewable [encoding convertto utf-16be 😹] } {Ø=Þ9 (\u00D8=\u00DE9)} +test encoding-11.10 {encoding: extended Unicode UTF-32} { + viewable [encoding convertto utf-32le 😹] +} "9\xF6\x01\x00 (9\\u00F6\\u0001\\u0000)" +test encoding-11.11 {encoding: extended Unicode UTF-32} { + viewable [encoding convertto utf-32be 😹] +} "\x00\x01\xF69 (\\u0000\\u0001\\u00F69)" # OpenEncodingFile is fully tested by the rest of the tests in this file. test encoding-12.1 {LoadTableEncoding: normal encoding} { @@ -461,10 +467,18 @@ test encoding-16.4 {Ucs2ToUtfProc} -body { set val [encoding convertfrom ucs-2 NN] list $val [format %x [scan $val %c]] } -result "乎 4e4e" -test encoding-16.4 {Ucs2ToUtfProc} -body { +test encoding-16.5 {Ucs2ToUtfProc} -body { set val [encoding convertfrom ucs-2 "\xD8\xD8\xDC\xDC"] list $val [format %x [scan $val %c]] } -result "\U460DC 460dc" +test encoding-16.6 {Utf32ToUtfProc} -body { + set val [encoding convertfrom utf-32le NN\0\0] + list $val [format %x [scan $val %c]] +} -result "乎 4e4e" +test encoding-16.7 {Utf32ToUtfProc} -body { + set val [encoding convertfrom utf-32be \0\0NN] + list $val [format %x [scan $val %c]] +} -result "乎 4e4e" test encoding-17.1 {UtfToUtf16Proc} -body { encoding convertto utf-16 "\U460DC" @@ -478,6 +492,12 @@ test encoding-17.3 {UtfToUtf16Proc} -body { test encoding-17.4 {UtfToUtf16Proc} -body { encoding convertto utf-16le "\uD8D8" } -result "\xFD\xFF" +test encoding-17.5 {UtfToUtf16Proc} -body { + encoding convertto utf-32le "\U460DC" +} -result "\xDC\x60\x04\x00" +test encoding-17.6 {UtfToUtf16Proc} -body { + encoding convertto utf-32be "\U460DC" +} -result "\x00\x04\x60\xDC" test encoding-18.1 {TableToUtfProc} { } {} @@ -777,7 +797,7 @@ test encoding-28.0 {all encodings load} -body { llength $name } return $count -} -result [expr {[info exists ::tcl_precision] ? 89 : 88}] +} -result [expr {[info exists ::tcl_precision] ? 92 : 91}] runtests |