diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-05-02 10:15:29 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-05-02 10:15:29 (GMT) |
commit | cc90266615cb98853ebc61301119d1f7a3718d7a (patch) | |
tree | 1167775adeaae4fde1ce7a1e720d34db4960a358 /tests | |
parent | 9eaf82b745ac07bc55f7238813c449fc5a447cf8 (diff) | |
download | tcl-cc90266615cb98853ebc61301119d1f7a3718d7a.zip tcl-cc90266615cb98853ebc61301119d1f7a3718d7a.tar.gz tcl-cc90266615cb98853ebc61301119d1f7a3718d7a.tar.bz2 |
More fixes for [ed29806baf]. Not working yet. WIP
Diffstat (limited to 'tests')
-rw-r--r-- | tests/utf.test | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/tests/utf.test b/tests/utf.test index 0929801..50351cb 100644 --- a/tests/utf.test +++ b/tests/utf.test @@ -29,6 +29,7 @@ testConstraint pre388 [eq \x741 A] testConstraint pairsTo4bytes [expr {[llength [info commands teststringbytes]] && [string length [teststringbytes \uD83D\uDCA9]] == 4}] +testConstraint teststringbytes [llength [info commands teststringbytes]] testConstraint testbytestring [llength [info commands testbytestring]] testConstraint testfindfirst [llength [info commands testfindfirst]] testConstraint testfindlast [llength [info commands testfindlast]] @@ -501,7 +502,7 @@ test utf-6.93.0 {Tcl_UtfNext, pointing to 2th byte of 4-byte invalid sequence} { } 1 test utf-6.93.1 {Tcl_UtfNext, pointing to 2th byte of 4-byte invalid sequence} {testutfnext fullutf} { testutfnext \x80\x80\x80 -} 1 +} 3 test utf-6.94 {Tcl_UtfNext, pointing to 2th byte of 5-byte invalid sequence} testutfnext { testutfnext \xA0\xA0\xA0\xA0 } 1 @@ -601,18 +602,18 @@ test utf-6.117.1 {Tcl_UtfNext, read limits} {testutfnext fullutf} { test utf-6.118 {Tcl_UtfNext, read limits} testutfnext { testutfnext \xA0G 0 } 0 -test utf-6.119 {Tcl_UtfNext, read limits} {testutfnext ucs2} { +test utf-6.119 {Tcl_UtfNext, read limits} testutfnext { testutfnext \xA0G 1 -} 1 -test utf-6.120 {Tcl_UtfNext, read limits} {testutfnext ucs2} { +} 0 +test utf-6.120 {Tcl_UtfNext, read limits} testutfnext { testutfnext \xA0\xA0 1 -} 1 -test utf-6.121 {Tcl_UtfNext, read limits} {testutfnext ucs2} { +} 0 +test utf-6.121 {Tcl_UtfNext, read limits} testutfnext { testutfnext \xA0\xA0G 2 -} 1 -test utf-6.122 {Tcl_UtfNext, read limits} {testutfnext ucs2} { +} 0 +test utf-6.122 {Tcl_UtfNext, read limits} testutfnext { testutfnext \xA0\xA0\xA0 2 -} 1 +} 0 test utf-6.123 {Tcl_UtfNext, read limits} testutfnext { testutfnext \xA0\xA0\xA0G 3 } 1 @@ -990,9 +991,9 @@ test utf-8.5.0 {Tcl_UniCharAtIndex: high surrogate} ucs2 { test utf-8.5.1 {Tcl_UniCharAtIndex: high surrogate} ucs4 { string index \uD842 0 } "\uD842" -test utf-8.5.2 {Tcl_UniCharAtIndex: high surrogate} tip389 { - string index \uD842 0 -} "\uD842" +test utf-8.5.2 {Tcl_UniCharAtIndex: high surrogate} {teststringbytes tip389} { + teststringbytes [string index \uD842 0] +} \xF0 test utf-8.6 {Tcl_UniCharAtIndex: low surrogate} { string index \uDC42 0 } "\uDC42" @@ -1002,18 +1003,18 @@ test utf-8.7.0 {Tcl_UniCharAtIndex: Emoji} ucs2 { test utf-8.7.1 {Tcl_UniCharAtIndex: Emoji} ucs4 { string index \uD83D\uDE00G 0 } "\U1F600" -test utf-8.7.2 {Tcl_UniCharAtIndex: Emoji} tip389 { - string index \uD83D\uDE00G 0 -} "\U1F600" +test utf-8.7.2 {Tcl_UniCharAtIndex: Emoji} {teststringbytes tip389} { + teststringbytes [string index \uD83D\uDE00G 0] +} \xF0 test utf-8.8.0 {Tcl_UniCharAtIndex: Emoji} ucs2 { string index \uD83D\uDE00G 1 } "\uDE00" test utf-8.8.1 {Tcl_UniCharAtIndex: Emoji} ucs4 { string index \uD83D\uDE00G 1 } G -test utf-8.8.2 {Tcl_UniCharAtIndex: Emoji} tip389 { - string index \uD83D\uDE00G 1 -} {} +test utf-8.8.2 {Tcl_UniCharAtIndex: Emoji} {teststringbytes tip389} { + teststringbytes [string index \uD83D\uDE00G 1] +} \xED\xB8\x80 test utf-8.9.0 {Tcl_UniCharAtIndex: Emoji} ucs2 { string index \uD83D\uDE00G 2 } G @@ -1029,9 +1030,9 @@ test utf-8.10.0 {Tcl_UniCharAtIndex: Emoji} {Uesc ucs2} { test utf-8.10.1 {Tcl_UniCharAtIndex: Emoji} {Uesc ucs4} { string index \U1F600G 0 } "\U1F600" -test utf-8.10.2 {Tcl_UniCharAtIndex: Emoji} {Uesc tip389} { - string index \U1F600G 0 -} "\U1F600" +test utf-8.10.2 {Tcl_UniCharAtIndex: Emoji} {Uesc teststringbytes tip389} { + teststringbytes [string index \U1F600G 0] +} \xF0 test utf-8.11.0 {Tcl_UniCharAtIndex: Emoji} {Uesc ucs2} { string index \U1F600G 1 } G @@ -1040,7 +1041,7 @@ test utf-8.11.1 {Tcl_UniCharAtIndex: Emoji} {Uesc ucs4} { } G test utf-8.11.2 {Tcl_UniCharAtIndex: Emoji} {Uesc tip389} { string index \U1F600G 1 -} {} +} \uDE00 test utf-8.12.0 {Tcl_UniCharAtIndex: Emoji} {Uesc ucs2} { string index \U1F600G 2 } {} |