diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-03-12 20:39:42 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-03-12 20:39:42 (GMT) |
commit | da96c5304100d70d932bcb73796c068d7e416cae (patch) | |
tree | 70ebb652915b8a287b4fca9dc7e7f8e8165ba3c2 /tests/encoding.test | |
parent | 8e7a963f7fb10cc556337a18a652fd0c78c51029 (diff) | |
download | tcl-da96c5304100d70d932bcb73796c068d7e416cae.zip tcl-da96c5304100d70d932bcb73796c068d7e416cae.tar.gz tcl-da96c5304100d70d932bcb73796c068d7e416cae.tar.bz2 |
Even better support for -DTCL_UTF_MAX=6. Ongoing improvements (TIP being planned)
Diffstat (limited to 'tests/encoding.test')
-rw-r--r-- | tests/encoding.test | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/tests/encoding.test b/tests/encoding.test index 4736928..da34f03 100644 --- a/tests/encoding.test +++ b/tests/encoding.test @@ -322,18 +322,29 @@ test encoding-15.3 {UtfToUtfProc null character input} teststringbytes { set z } c080 -test encoding-16.1 {UnicodeToUtfProc} -body { - set val [encoding convertfrom unicode NN] +test encoding-16.1 {Utf16ToUtfProc} -body { + set val [encoding convertfrom utf-16 NN] list $val [format %x [scan $val %c]] } -result "\u4e4e 4e4e" -test encoding-16.2 {UnicodeToUtfProc} -body { - set val [encoding convertfrom unicode "\xd8\xd8\xdc\xdc"] +test encoding-16.2 {Utf16ToUtfProc} -body { + set val [encoding convertfrom utf-16 "\xd8\xd8\xdc\xdc"] + list $val [format %x [scan $val %c]] +} -result "\U460dc 460dc" +test encoding-16.3 {Ucs2ToUtfProc} -body { + set val [encoding convertfrom ucs-2 NN] + list $val [format %x [scan $val %c]] +} -result "\u4e4e 4e4e" +test encoding-16.4 {Ucs2ToUtfProc} -body { + set val [encoding convertfrom ucs-2 "\xd8\xd8\xdc\xdc"] list $val [format %x [scan $val %c]] } -result "\U460dc 460dc" -test encoding-17.1 {UtfToUnicodeProc} -body { - encoding convertto unicode "\U460dc" +test encoding-17.1 {UtfToUtf16Proc} -body { + encoding convertto utf-16 "\U460dc" } -result "\xd8\xd8\xdc\xdc" +test encoding-17.2 {UtfToUcs2Proc} -body { + encoding convertfrom utf-16 [encoding convertto ucs-2 "\U460dc"] +} -result "\ufffd" test encoding-18.1 {TableToUtfProc} { } {} |