diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/binary.test | 15 | ||||
-rw-r--r-- | tests/encoding.test | 10 | ||||
-rw-r--r-- | tests/reg.test | 1 | ||||
-rw-r--r-- | tests/string.test | 20 | ||||
-rw-r--r-- | tests/utf.test | 637 |
5 files changed, 578 insertions, 105 deletions
diff --git a/tests/binary.test b/tests/binary.test index a777b2a..b06afe0 100644 --- a/tests/binary.test +++ b/tests/binary.test @@ -16,6 +16,7 @@ if {[lsearch [namespace children] ::tcltest] == -1} { } testConstraint bigEndian [expr {$tcl_platform(byteOrder) eq "bigEndian"}] testConstraint littleEndian [expr {$tcl_platform(byteOrder) eq "littleEndian"}] +testConstraint testbytestring [llength [info commands testbytestring]] # Big test for correct ordering of data in [expr] proc testIEEE {} { @@ -2941,7 +2942,19 @@ test binary-79.2 {Tcl_SetByteArrayLength} testsetbytearraylength { testsetbytearraylength [string cat \u0141 B C] 1 } A - +test binary-80.1 {TclGetBytesFromObj} -constraints testbytestring -returnCodes 1 -body { + testbytestring "\u4E4E" +} -result "expected byte sequence but character 0 was '\u4E4E' (U+004E4E)" +test binary-80.2 {TclGetBytesFromObj} -constraints testbytestring -returnCodes 1 -body { + testbytestring [testbytestring "\x00\xA0\xA0\xA0\xE4\xB9\x8E"] +} -result "expected byte sequence but character 4 was '\u4E4E' (U+004E4E)" +test binary-80.3 {TclGetBytesFromObj} -constraints testbytestring -returnCodes 1 -body { + testbytestring [testbytestring "\xC0\x80\xA0\xA0\xA0\xE4\xB9\x8E"] +} -result "expected byte sequence but character 4 was '\u4E4E' (U+004E4E)" +test binary-80.4 {TclGetBytesFromObj} -constraints testbytestring -returnCodes 1 -body { + testbytestring [testbytestring "\xC0\x80\xA0\xA0\xA0\xF0\x9F\x98\x81"] +} -result "expected byte sequence but character 4 was '\U01F601' (U+01F601)" + # ---------------------------------------------------------------------- # cleanup diff --git a/tests/encoding.test b/tests/encoding.test index 664a041..ccc32da 100644 --- a/tests/encoding.test +++ b/tests/encoding.test @@ -283,16 +283,16 @@ test encoding-11.6 {LoadEncodingFile: invalid file} -constraints {testencoding} # OpenEncodingFile is fully tested by the rest of the tests in this file. test encoding-12.1 {LoadTableEncoding: normal encoding} { - set x [encoding convertto iso8859-3 \u120] - append x [encoding convertto iso8859-3 \ud5] - append x [encoding convertfrom iso8859-3 \xd5] + set x [encoding convertto iso8859-3 \u0120] + append x [encoding convertto iso8859-3 \xD5] + append x [encoding convertfrom iso8859-3 \xD5] } "\xd5?\u120" test encoding-12.2 {LoadTableEncoding: single-byte encoding} { set x [encoding convertto iso8859-3 ab\u0120g] - append x [encoding convertfrom iso8859-3 ab\xd5g] + append x [encoding convertfrom iso8859-3 ab\xD5g] } "ab\xd5gab\u120g" test encoding-12.3 {LoadTableEncoding: multi-byte encoding} { - set x [encoding convertto shiftjis ab\u4e4eg] + set x [encoding convertto shiftjis ab\u4E4Eg] append x [encoding convertfrom shiftjis ab\x8c\xc1g] } "ab\x8c\xc1gab\u4e4eg" test encoding-12.4 {LoadTableEncoding: double-byte encoding} { diff --git a/tests/reg.test b/tests/reg.test index b9dc538..dabd3bc 100644 --- a/tests/reg.test +++ b/tests/reg.test @@ -626,6 +626,7 @@ expectMatch 13.14 P "a\\rb" "a\rb" "a\rb" expectMatch 13.15 P "a\\tb" "a\tb" "a\tb" expectMatch 13.16 P "a\\u0008x" "a\bx" "a\bx" expectMatch 13.17 P {a\u008x} "a\bx" "a\bx" +expectError 13.17.1 - {a\ux} EESCAPE expectMatch 13.18 P "a\\u00088x" "a\b8x" "a\b8x" expectMatch 13.19 P "a\\U00000008x" "a\bx" "a\bx" expectMatch 13.20 P {a\U0000008x} "a\bx" "a\bx" diff --git a/tests/string.test b/tests/string.test index 223251e..98890f9 100644 --- a/tests/string.test +++ b/tests/string.test @@ -1814,11 +1814,11 @@ test string-20.5.$noComp {string trimright} { test string-20.6.$noComp {string trimright, unicode default} { run {string trimright ABC\u1361\x85\x00\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u200B\u2028\u2029\u202F\u205F\u3000} } ABC\u1361 -test string-20.7.$noComp {string trim on not valid utf-8 sequence (consider NTS as continuation char), bug [c61818e4c9]} {testbytestring knownBug} { +test string-20.7.$noComp {string trim on not valid utf-8 sequence (consider NTS as continuation char), bug [c61818e4c9]} {testbytestring} { set result {} - set a [testbytestring \xC0\x80\x88] + set a [testbytestring \xC0\x80\xA0] set b foo$a - set m [list \x00 U \x88 V [testbytestring \x88] W] + set m [list \x00 U \xA0 V [testbytestring \xA0] W] lappend result [string map $m $b] lappend result [string map $m [run {string trimright $b x}]] lappend result [string map $m [run {string trimright $b \x00}]] @@ -1827,19 +1827,19 @@ test string-20.7.$noComp {string trim on not valid utf-8 sequence (consider NTS lappend result [string map $m [run {string trim $b fox}]] lappend result [string map $m [run {string trim $b fo\x00}]] } [list {*}[lrepeat 3 fooUV] {*}[lrepeat 2 UV V]] -test string-20.8 {[c61818e4c9] [string trimright] fails when UtfPrev is ok} {testbytestring knownBug} { +test string-20.8.$noComp {[c61818e4c9] [string trimright] fails when UtfPrev is ok} {testbytestring} { set result {} - set a [testbytestring \xE8\x80] + set a [testbytestring \xE8\xA0] set b foo$a - set m [list \xE8 U \x80 V [testbytestring \xE8] W [testbytestring \x80] X]] + set m [list \xE8 U \xA0 V [testbytestring \xE8] W [testbytestring \xA0] X]] lappend result [string map $m $b] lappend result [string map $m [run {string trimright $b x}]] lappend result [string map $m [run {string trimright $b \xE8}]] lappend result [string map $m [run {string trimright $b [testbytestring \xE8]}]] - lappend result [string map $m [run {string trimright $b \x80}]] - lappend result [string map $m [run {string trimright $b [testbytestring \x80]}]] - lappend result [string map $m [run {string trimright $b \xE8\x80}]] - lappend result [string map $m [run {string trimright $b [testbytestring \xE8\x80]}]] + lappend result [string map $m [run {string trimright $b \xA0}]] + lappend result [string map $m [run {string trimright $b [testbytestring \xA0]}]] + lappend result [string map $m [run {string trimright $b \xE8\xA0}]] + lappend result [string map $m [run {string trimright $b [testbytestring \xE8\xA0]}]] lappend result [string map $m [run {string trimright $b \u0000}]] } [list {*}[lrepeat 4 fooUV] {*}[lrepeat 2 fooU] {*}[lrepeat 2 foo] fooUV] diff --git a/tests/utf.test b/tests/utf.test index 9744703..35d7855 100644 --- a/tests/utf.test +++ b/tests/utf.test @@ -13,15 +13,32 @@ if {[lsearch [namespace children] ::tcltest] == -1} { namespace import -force ::tcltest::* } +namespace path ::tcl::mathop + ::tcltest::loadTestedCommands catch [list package require -exact Tcltest [info patchlevel]] +testConstraint ucs2 [expr {[format %c 0x010000] eq "\uFFFD"}] +testConstraint fullutf [expr {[format %c 0x010000] ne "\uFFFD"}] +testConstraint tip389 [expr {[string length [format %c 0x10000]] eq 2}] +testConstraint ucs4 [expr {[testConstraint fullutf] + && [string length [format %c 0x10000]] == 1}] + +testConstraint Uesc [eq \U0041 A] +testConstraint pairsTo4bytes [expr {[llength [info commands teststringbytes]] + && [string length [teststringbytes \uD83D\uDCA9]] == 4}] + testConstraint testbytestring [llength [info commands testbytestring]] +testConstraint testfindfirst [llength [info commands testfindfirst]] +testConstraint testfindlast [llength [info commands testfindlast]] +testConstraint testnumutfchars [llength [info commands testnumutfchars]] +testConstraint teststringobj [llength [info commands teststringobj]] +testConstraint testutfnext [llength [info commands testutfnext]] +testConstraint testutfprev [llength [info commands testutfprev]] -catch {unset x} +testConstraint tip413 [eq {} [string trim \x00]] -# Some tests require support for 4-byte UTF-8 sequences -testConstraint tip389 [expr {[string length \U010000] == 2}] +catch {unset x} test utf-1.1 {Tcl_UniCharToUtf: 1 byte sequences} testbytestring { expr {"\x01" eq [testbytestring "\x01"]} @@ -41,9 +58,12 @@ test utf-1.5 {Tcl_UniCharToUtf: overflowed Tcl_UniChar} testbytestring { test utf-1.6 {Tcl_UniCharToUtf: negative Tcl_UniChar} testbytestring { expr {[format %c -1] eq [testbytestring "\xEF\xBF\xBD"]} } 1 -test utf-1.7 {Tcl_UniCharToUtf: 4 byte sequences} -constraints testbytestring -body { +test utf-1.7.0 {Tcl_UniCharToUtf: 4 byte sequences} {fullutf Uesc testbytestring} { expr {"\U014E4E" eq [testbytestring "\xF0\x94\xB9\x8E"]} -} -result 1 +} 1 +test utf-1.7.1 {Tcl_UniCharToUtf: 4 byte sequences} {ucs2 Uesc testbytestring} { + expr {"\U014E4E" eq [testbytestring "\xF0\x94\xB9\x8E"]} +} 0 test utf-1.8 {Tcl_UniCharToUtf: 3 byte sequence, high surrogate} testbytestring { expr {"\uD842" eq [testbytestring "\xED\xA1\x82"]} } 1 @@ -56,106 +76,398 @@ test utf-1.10 {Tcl_UniCharToUtf: 3 byte sequence, high surrogate} testbytestring test utf-1.11 {Tcl_UniCharToUtf: 3 byte sequence, low surrogate} testbytestring { expr {[format %c 0xDC42] eq [testbytestring "\xED\xB1\x82"]} } 1 -test utf-1.12 {Tcl_UniCharToUtf: 4 byte sequence, high/low surrogate} testbytestring { +test utf-1.12 {Tcl_UniCharToUtf: 4 byte sequence, high/low surrogate} {pairsTo4bytes testbytestring} { expr {"\uD842\uDC42" eq [testbytestring "\xF0\xA0\xA1\x82"]} } 1 -test utf-1.13 {Tcl_UniCharToUtf: Invalid surrogate} testbytestring { +test utf-1.13 {Tcl_UniCharToUtf: Invalid surrogate} {Uesc testbytestring} { expr {"\UD842" eq [testbytestring "\xEF\xBF\xBD"]} } 1 test utf-2.1 {Tcl_UtfToUniChar: low ascii} { string length "abc" -} {3} +} 3 test utf-2.2 {Tcl_UtfToUniChar: naked trail bytes} testbytestring { string length [testbytestring "\x82\x83\x84"] -} {3} +} 3 test utf-2.3 {Tcl_UtfToUniChar: lead (2-byte) followed by non-trail} testbytestring { string length [testbytestring "\xC2"] -} {1} +} 1 test utf-2.4 {Tcl_UtfToUniChar: lead (2-byte) followed by trail} testbytestring { string length [testbytestring "\xC2\xA2"] -} {1} +} 1 test utf-2.5 {Tcl_UtfToUniChar: lead (3-byte) followed by non-trail} testbytestring { string length [testbytestring "\xE2"] -} {1} +} 1 test utf-2.6 {Tcl_UtfToUniChar: lead (3-byte) followed by 1 trail} testbytestring { string length [testbytestring "\xE2\xA2"] -} {2} +} 2 test utf-2.7 {Tcl_UtfToUniChar: lead (3-byte) followed by 2 trail} testbytestring { string length [testbytestring "\xE4\xB9\x8E"] -} {1} -test utf-2.8 {Tcl_UtfToUniChar: lead (4-byte) followed by 3 trail} -constraints {tip389 testbytestring} -body { +} 1 +test utf-2.8.0 {Tcl_UtfToUniChar: lead (4-byte) followed by 3 trail} {testbytestring ucs2} { string length [testbytestring "\xF0\x90\x80\x80"] -} -result {2} -test utf-2.9 {Tcl_UtfToUniChar: lead (4-byte) followed by 3 trail} -constraints {tip389 testbytestring} -body { +} 4 +test utf-2.8.1 {Tcl_UtfToUniChar: lead (4-byte) followed by 3 trail} {testbytestring ucs4} { + string length [testbytestring "\xF0\x90\x80\x80"] +} 1 +test utf-2.8.2 {Tcl_UtfToUniChar: lead (4-byte) followed by 3 trail} {testbytestring tip389} { + string length [testbytestring "\xF0\x90\x80\x80"] +} 2 +test utf-2.9.0 {Tcl_UtfToUniChar: lead (4-byte) followed by 3 trail} {testbytestring ucs2} { + string length [testbytestring "\xF4\x8F\xBF\xBF"] +} 4 +test utf-2.9.1 {Tcl_UtfToUniChar: lead (4-byte) followed by 3 trail} {testbytestring ucs4} { + string length [testbytestring "\xF4\x8F\xBF\xBF"] +} 1 +test utf-2.9.2 {Tcl_UtfToUniChar: lead (4-byte) followed by 3 trail} {testbytestring tip389} { string length [testbytestring "\xF4\x8F\xBF\xBF"] -} -result {2} +} 2 test utf-2.10 {Tcl_UtfToUniChar: lead (4-byte) followed by 3 trail, underflow} testbytestring { string length [testbytestring "\xF0\x8F\xBF\xBF"] -} {4} +} 4 test utf-2.11 {Tcl_UtfToUniChar: lead (4-byte) followed by 3 trail, overflow} testbytestring { + # Would decode to U+110000 but that is outside the Unicode range. string length [testbytestring "\xF4\x90\x80\x80"] -} {4} +} 4 test utf-2.12 {Tcl_UtfToUniChar: longer UTF sequences not supported} testbytestring { string length [testbytestring "\xF8\xA2\xA2\xA2\xA2"] -} {5} +} 5 test utf-3.1 {Tcl_UtfCharComplete} { } {} -testConstraint testnumutfchars [llength [info commands testnumutfchars]] -testConstraint testfindfirst [llength [info commands testfindfirst]] -testConstraint testfindlast [llength [info commands testfindlast]] - test utf-4.1 {Tcl_NumUtfChars: zero length} testnumutfchars { testnumutfchars "" -} {0} +} 0 test utf-4.2 {Tcl_NumUtfChars: length 1} {testnumutfchars testbytestring} { testnumutfchars [testbytestring "\xC2\xA2"] -} {1} +} 1 test utf-4.3 {Tcl_NumUtfChars: long string} {testnumutfchars testbytestring} { - testnumutfchars [testbytestring "abc\xC2\xA2\xE4\xB9\x8E\uA2\x4E"] -} {7} + testnumutfchars [testbytestring "abc\xC2\xA2\xE4\xB9\x8E\xA2\x4E"] +} 7 test utf-4.4 {Tcl_NumUtfChars: #u0000} {testnumutfchars testbytestring} { testnumutfchars [testbytestring "\xC0\x80"] -} {1} +} 1 test utf-4.5 {Tcl_NumUtfChars: zero length, calc len} testnumutfchars { testnumutfchars "" 0 -} {0} +} 0 test utf-4.6 {Tcl_NumUtfChars: length 1, calc len} {testnumutfchars testbytestring} { testnumutfchars [testbytestring "\xC2\xA2"] end -} {1} +} 1 test utf-4.7 {Tcl_NumUtfChars: long string, calc len} {testnumutfchars testbytestring} { testnumutfchars [testbytestring "abc\xC2\xA2\xE4\xB9\x8E\uA2\x4E"] end -} {7} +} 7 test utf-4.8 {Tcl_NumUtfChars: #u0000, calc len} {testnumutfchars testbytestring} { testnumutfchars [testbytestring "\xC0\x80"] end -} {1} +} 1 # Bug [2738427]: Tcl_NumUtfChars(...) no overflow check test utf-4.9 {Tcl_NumUtfChars: #u20AC, calc len, incomplete} {testnumutfchars testbytestring} { testnumutfchars [testbytestring "\xE2\x82\xAC"] end-1 -} {2} +} 2 test utf-4.10 {Tcl_NumUtfChars: #u0000, calc len, overcomplete} {testnumutfchars testbytestring} { testnumutfchars [testbytestring "\x00"] end+1 -} {2} +} 2 test utf-4.11 {Tcl_NumUtfChars: 3 bytes of 4-byte UTF-8 characater} {testnumutfchars testbytestring} { - testnumutfchars [testbytestring \xf0\x9f\x92\xa9] end-1 -} {3} -test utf-4.12 {Tcl_NumUtfChars: #4-byte UTF-8 character} {testnumutfchars testbytestring tip389} { - testnumutfchars [testbytestring \xf0\x9f\x92\xa9] end -} {2} + testnumutfchars [testbytestring \xF0\x9F\x92\xA9] end-1 +} 3 +test utf-4.12.0 {Tcl_NumUtfChars: #4-byte UTF-8 character} {testnumutfchars testbytestring ucs2} { + testnumutfchars [testbytestring \xF0\x9F\x92\xA9] end +} 4 +test utf-4.12.1 {Tcl_NumUtfChars: #4-byte UTF-8 character} {testnumutfchars testbytestring ucs4} { + testnumutfchars [testbytestring \xF0\x9F\x92\xA9] end +} 1 +test utf-4.12.2 {Tcl_NumUtfChars: #4-byte UTF-8 character} {testnumutfchars testbytestring tip389} { + testnumutfchars [testbytestring \xF0\x9F\x92\xA9] end +} 2 test utf-5.1 {Tcl_UtfFindFirst} {testfindfirst testbytestring} { testfindfirst [testbytestring "abcbc"] 98 -} {bcbc} +} bcbc test utf-5.2 {Tcl_UtfFindLast} {testfindlast testbytestring} { testfindlast [testbytestring "abcbc"] 98 -} {bc} - -test utf-6.1 {Tcl_UtfNext} { -} {} +} bc -testConstraint testutfprev [llength [info commands testutfprev]] +test utf-6.1 {Tcl_UtfNext} testutfnext { + # This takes the pointer one past the terminating NUL. + # This is really an invalid call. + testutfnext -bytestring {} +} 1 +test utf-6.2 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring A +} 1 +test utf-6.3 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring AA +} 1 +test utf-6.4 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring A\xA0 +} 1 +test utf-6.5 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring A\xD0 +} 1 +test utf-6.6 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring A\xE8 +} 1 +test utf-6.7 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring A\xF2 +} 1 +test utf-6.8 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring A\xF8 +} 1 +test utf-6.9 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xA0 +} 1 +test utf-6.10 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xA0G +} 1 +test utf-6.11 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xA0\xA0 +} 2 +test utf-6.12 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xA0\xD0 +} 1 +test utf-6.13 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xA0\xE8 +} 1 +test utf-6.14 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xA0\xF2 +} 1 +test utf-6.15 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xA0\xF8 +} 1 +test utf-6.16 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xD0 +} 1 +test utf-6.17 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xD0G +} 1 +test utf-6.18 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xD0\xA0 +} 2 +test utf-6.19 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xD0\xD0 +} 1 +test utf-6.20 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xD0\xE8 +} 1 +test utf-6.21 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xD0\xF2 +} 1 +test utf-6.22 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xD0\xF8 +} 1 +test utf-6.23 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xE8 +} 1 +test utf-6.24 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xE8G +} 1 +test utf-6.25 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xE8\xA0 +} 1 +test utf-6.26 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xE8\xD0 +} 1 +test utf-6.27 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xE8\xE8 +} 1 +test utf-6.28 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xE8\xF2 +} 1 +test utf-6.29 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xE8\xF8 +} 1 +test utf-6.30 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xF2 +} 1 +test utf-6.31 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xF2G +} 1 +test utf-6.32 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xF2\xA0 +} 1 +test utf-6.33 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xF2\xD0 +} 1 +test utf-6.34 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xF2\xE8 +} 1 +test utf-6.35 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xF2\xF2 +} 1 +test utf-6.36 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xF2\xF8 +} 1 +test utf-6.37 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xF8 +} 1 +test utf-6.38 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xF8G +} 1 +test utf-6.39 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xF8\xA0 +} 1 +test utf-6.40 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xF8\xD0 +} 1 +test utf-6.41 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xF8\xE8 +} 1 +test utf-6.42 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xF8\xF2 +} 1 +test utf-6.43 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xF8\xF8 +} 1 +test utf-6.44 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xD0\xA0G +} 2 +test utf-6.45 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xD0\xA0\xA0 +} 2 +test utf-6.46 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xD0\xA0\xD0 +} 2 +test utf-6.47 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xD0\xA0\xE8 +} 2 +test utf-6.48 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xD0\xA0\xF2 +} 2 +test utf-6.49 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xD0\xA0\xF8 +} 2 +test utf-6.50 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xE8\xA0G +} 1 +test utf-6.51 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xE8\xA0\xA0 +} 3 +test utf-6.52 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xE8\xA0\xD0 +} 1 +test utf-6.53 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xE8\xA0\xE8 +} 1 +test utf-6.54 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xE8\xA0\xF2 +} 1 +test utf-6.55 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xE8\xA0\xF8 +} 1 +test utf-6.56 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xF2\xA0G +} 1 +test utf-6.57 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xF2\xA0\xA0 +} 1 +test utf-6.58 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xF2\xA0\xD0 +} 1 +test utf-6.59 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xF2\xA0\xE8 +} 1 +test utf-6.60 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xF2\xA0\xF2 +} 1 +test utf-6.61 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xF2\xA0\xF8 +} 1 +test utf-6.62 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xE8\xA0\xA0G +} 3 +test utf-6.63 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xE8\xA0\xA0\xA0 +} 3 +test utf-6.64 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xE8\xA0\xA0\xD0 +} 3 +test utf-6.65 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xE8\xA0\xA0\xE8 +} 3 +test utf-6.66 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xE8\xA0\xA0\xF2 +} 3 +test utf-6.67 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xE8\xA0\xA0\xF8 +} 3 +test utf-6.68 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xF2\xA0\xA0G +} 1 +test utf-6.69 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xF2\xA0\xA0\xA0 +} 4 +test utf-6.70 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xF2\xA0\xA0\xD0 +} 1 +test utf-6.71 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xF2\xA0\xA0\xE8 +} 1 +test utf-6.72 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xF2\xA0\xA0\xF2 +} 1 +test utf-6.73 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xF2\xA0\xA0\xF8 +} 1 +test utf-6.74 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xF2\xA0\xA0\xA0G +} 4 +test utf-6.75 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xF2\xA0\xA0\xA0\xA0 +} 4 +test utf-6.76 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xF2\xA0\xA0\xA0\xD0 +} 4 +test utf-6.77 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xF2\xA0\xA0\xA0\xE8 +} 4 +test utf-6.78 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xF2\xA0\xA0\xA0\xF2 +} 4 +test utf-6.79 {Tcl_UtfNext} testutfnext { + testutfnext -bytestring \xF2\xA0\xA0\xA0G\xF8 +} 4 +test utf-6.80 {Tcl_UtfNext - overlong sequences} testutfnext { + testutfnext -bytestring \xC0\x80 +} 2 +test utf-6.81 {Tcl_UtfNext - overlong sequences} testutfnext { + testutfnext -bytestring \xC0\x81 +} 1 +test utf-6.82 {Tcl_UtfNext - overlong sequences} testutfnext { + testutfnext -bytestring \xC1\x80 +} 1 +test utf-6.83 {Tcl_UtfNext - overlong sequences} testutfnext { + testutfnext -bytestring \xC2\x80 +} 2 +test utf-6.84 {Tcl_UtfNext - overlong sequences} testutfnext { + testutfnext -bytestring \xE0\x80\x80 +} 1 +test utf-6.85 {Tcl_UtfNext - overlong sequences} testutfnext { + testutfnext -bytestring \xE0\xA0\x80 +} 3 +test utf-6.86 {Tcl_UtfNext - overlong sequences} testutfnext { + testutfnext -bytestring \xF0\x80\x80\x80 +} 1 +test utf-6.87 {Tcl_UtfNext - overlong sequences} testutfnext { + testutfnext -bytestring \xF0\x90\x80\x80 +} 4 +test utf-6.88 {Tcl_UtfNext, pointing to 2th byte of 3-byte valid sequence} testutfnext { + testutfnext -bytestring \xA0\xA0 +} 2 +test utf-6.89 {Tcl_UtfNext, pointing to 2th byte of 3-byte invalid sequence} testutfnext { + testutfnext -bytestring \x80\x80 +} 2 +test utf-6.90 {Tcl_UtfNext, validity check [493dccc2de]} testutfnext { + testutfnext -bytestring \xF4\x8F\xBF\xBF +} 4 +test utf-6.91 {Tcl_UtfNext, validity check [493dccc2de]} testutfnext { + testutfnext -bytestring \xF4\x90\x80\x80 +} 1 +test utf-6.92 {Tcl_UtfNext, pointing to 2th byte of 4-byte valid sequence} testutfnext { + testutfnext -bytestring \xA0\xA0\xA0 +} 3 +test utf-6.93 {Tcl_UtfNext, pointing to 2th byte of 4-byte invalid sequence} testutfnext { + testutfnext -bytestring \x80\x80\x80 +} 3 test utf-7.1 {Tcl_UtfPrev} testutfprev { testutfprev {} @@ -176,13 +488,13 @@ test utf-7.4.2 {Tcl_UtfPrev} testutfprev { testutfprev A\xF8\xF8\xA0\xA0 2 } 1 test utf-7.5 {Tcl_UtfPrev} testutfprev { - testutfprev A\xF4 + testutfprev A\xF2 } 1 test utf-7.5.1 {Tcl_UtfPrev} testutfprev { - testutfprev A\xF4\xA0\xA0\xA0 2 + testutfprev A\xF2\xA0\xA0\xA0 2 } 1 test utf-7.5.2 {Tcl_UtfPrev} testutfprev { - testutfprev A\xF4\xF8\xA0\xA0 2 + testutfprev A\xF2\xF8\xA0\xA0 2 } 1 test utf-7.6 {Tcl_UtfPrev} testutfprev { testutfprev A\xE8 @@ -221,13 +533,13 @@ test utf-7.9.2 {Tcl_UtfPrev} testutfprev { testutfprev A\xF8\xA0\xF8\xA0 3 } 2 test utf-7.10 {Tcl_UtfPrev} testutfprev { - testutfprev A\xF4\xA0 + testutfprev A\xF2\xA0 } 1 test utf-7.10.1 {Tcl_UtfPrev} testutfprev { - testutfprev A\xF4\xA0\xA0\xA0 3 + testutfprev A\xF2\xA0\xA0\xA0 3 } 1 test utf-7.10.2 {Tcl_UtfPrev} testutfprev { - testutfprev A\xF4\xA0\xF8\xA0 3 + testutfprev A\xF2\xA0\xF8\xA0 3 } 1 test utf-7.11 {Tcl_UtfPrev} testutfprev { testutfprev A\xE8\xA0 @@ -238,6 +550,9 @@ test utf-7.11.1 {Tcl_UtfPrev} testutfprev { test utf-7.11.2 {Tcl_UtfPrev} testutfprev { testutfprev A\xE8\xA0\xF8\xA0 3 } 1 +test utf-7.11.3 {Tcl_UtfPrev} testutfprev { + testutfprev A\xE8\xA0\xF8 3 +} 1 test utf-7.12 {Tcl_UtfPrev} testutfprev { testutfprev A\xD0\xA0 } 1 @@ -266,13 +581,13 @@ test utf-7.14.2 {Tcl_UtfPrev} testutfprev { testutfprev A\xF8\xA0\xA0\xF8 4 } 3 test utf-7.15 {Tcl_UtfPrev} testutfprev { - testutfprev A\xF4\xA0\xA0 + testutfprev A\xF2\xA0\xA0 } 1 test utf-7.15.1 {Tcl_UtfPrev} testutfprev { - testutfprev A\xF4\xA0\xA0\xA0 4 + testutfprev A\xF2\xA0\xA0\xA0 4 } 1 test utf-7.15.2 {Tcl_UtfPrev} testutfprev { - testutfprev A\xF4\xA0\xA0\xF8 4 + testutfprev A\xF2\xA0\xA0\xF8 4 } 1 test utf-7.16 {Tcl_UtfPrev} testutfprev { testutfprev A\xE8\xA0\xA0 @@ -305,7 +620,7 @@ test utf-7.19 {Tcl_UtfPrev} testutfprev { testutfprev A\xF8\xA0\xA0\xA0 } 4 test utf-7.20 {Tcl_UtfPrev} testutfprev { - testutfprev A\xF4\xA0\xA0\xA0 + testutfprev A\xF2\xA0\xA0\xA0 } 1 test utf-7.21 {Tcl_UtfPrev} testutfprev { testutfprev A\xE8\xA0\xA0\xA0 @@ -316,16 +631,124 @@ test utf-7.22 {Tcl_UtfPrev} testutfprev { test utf-7.23 {Tcl_UtfPrev} testutfprev { testutfprev A\xA0\xA0\xA0\xA0 } 4 +test utf-7.24 {Tcl_UtfPrev -- overlong sequence} testutfprev { + testutfprev A\xC0\x81 +} 2 +test utf-7.25 {Tcl_UtfPrev -- overlong sequence} testutfprev { + testutfprev A\xC0\x81 2 +} 1 +test utf-7.26 {Tcl_UtfPrev -- overlong sequence} testutfprev { + testutfprev A\xE0\x80\x80 +} 3 +test utf-7.27 {Tcl_UtfPrev -- overlong sequence} testutfprev { + testutfprev A\xE0\x80 +} 2 +test utf-7.27.1 {Tcl_UtfPrev -- overlong sequence} testutfprev { + testutfprev A\xE0\x80\x80 3 +} 2 +test utf-7.28 {Tcl_UtfPrev -- overlong sequence} testutfprev { + testutfprev A\xE0 +} 1 +test utf-7.28.1 {Tcl_UtfPrev -- overlong sequence} testutfprev { + testutfprev A\xE0\x80\x80 2 +} 1 +test utf-7.29 {Tcl_UtfPrev -- overlong sequence} testutfprev { + testutfprev A\xF0\x80\x80\x80 +} 4 +test utf-7.30 {Tcl_UtfPrev -- overlong sequence} testutfprev { + testutfprev A\xF0\x80\x80\x80 4 +} 3 +test utf-7.31 {Tcl_UtfPrev -- overlong sequence} testutfprev { + testutfprev A\xF0\x80\x80\x80 3 +} 2 +test utf-7.32 {Tcl_UtfPrev -- overlong sequence} testutfprev { + testutfprev A\xF0\x80\x80\x80 2 +} 1 +test utf-7.33 {Tcl_UtfPrev -- overlong sequence} testutfprev { + testutfprev A\xC0\x80 +} 1 +test utf-7.34 {Tcl_UtfPrev -- overlong sequence} testutfprev { + testutfprev A\xC1\x80 +} 2 +test utf-7.35 {Tcl_UtfPrev -- overlong sequence} testutfprev { + testutfprev A\xC2\x80 +} 1 +test utf-7.36 {Tcl_UtfPrev -- overlong sequence} testutfprev { + testutfprev A\xE0\xA0\x80 +} 1 +test utf-7.37 {Tcl_UtfPrev -- overlong sequence} testutfprev { + testutfprev A\xE0\xA0\x80 3 +} 1 +test utf-7.38 {Tcl_UtfPrev -- overlong sequence} testutfprev { + testutfprev A\xE0\xA0\x80 2 +} 1 +test utf-7.39 {Tcl_UtfPrev -- overlong sequence} testutfprev { + testutfprev A\xF0\x90\x80\x80 +} 1 +test utf-7.40 {Tcl_UtfPrev -- overlong sequence} testutfprev { + testutfprev A\xF0\x90\x80\x80 4 +} 1 +test utf-7.41 {Tcl_UtfPrev -- overlong sequence} testutfprev { + testutfprev A\xF0\x90\x80\x80 3 +} 1 +test utf-7.42 {Tcl_UtfPrev -- overlong sequence} testutfprev { + testutfprev A\xF0\x90\x80\x80 2 +} 1 +test utf-7.43 {Tcl_UtfPrev -- no lead byte at start} testutfprev { + testutfprev \xA0 +} 0 +test utf-7.44 {Tcl_UtfPrev -- no lead byte at start} testutfprev { + testutfprev \xA0\xA0 +} 1 +test utf-7.45 {Tcl_UtfPrev -- no lead byte at start} testutfprev { + testutfprev \xA0\xA0\xA0 +} 2 +test utf-7.46 {Tcl_UtfPrev -- no lead byte at start} testutfprev { + testutfprev \xA0\xA0\xA0\xA0 +} 3 +test utf-7.47 {Tcl_UtfPrev, pointing to 3th byte of 3-byte valid sequence} testutfprev { + testutfprev \xE8\xA0 +} 0 +test utf-7.47.1 {Tcl_UtfPrev, pointing to 3th byte of 3-byte valid sequence} testutfprev { + testutfprev \xE8\xA0\xA0 2 +} 0 +test utf-7.47.2 {Tcl_UtfPrev, pointing to 3th byte of 3-byte invalid sequence} testutfprev { + testutfprev \xE8\xA0\x00 2 +} 0 +test utf-7.48 {Tcl_UtfPrev, validity check [493dccc2de]} testutfprev { + testutfprev A\xF4\x8F\xBF\xBF +} 1 +test utf-7.48.1 {Tcl_UtfPrev, validity check [493dccc2de]} testutfprev { + testutfprev A\xF4\x8F\xBF\xBF 4 +} 1 +test utf-7.48.2 {Tcl_UtfPrev, validity check [493dccc2de]} testutfprev { + testutfprev A\xF4\x8F\xBF\xBF 3 +} 1 +test utf-7.48.3 {Tcl_UtfPrev, validity check [493dccc2de]} testutfprev { + testutfprev A\xF4\x8F\xBF\xBF 2 +} 1 +test utf-7.49 {Tcl_UtfPrev, validity check [493dccc2de]} testutfprev { + testutfprev A\xF4\x90\x80\x80 +} 4 +test utf-7.49.1 {Tcl_UtfPrev, validity check [493dccc2de]} testutfprev { + testutfprev A\xF4\x90\x80\x80 4 +} 3 +test utf-7.49.2 {Tcl_UtfPrev, validity check [493dccc2de]} testutfprev { + testutfprev A\xF4\x90\x80\x80 3 +} 2 +test utf-7.49.3 {Tcl_UtfPrev, validity check [493dccc2de]} testutfprev { + testutfprev A\xF4\x90\x80\x80 2 +} 1 test utf-8.1 {Tcl_UniCharAtIndex: index = 0} { string index abcd 0 -} {a} +} a test utf-8.2 {Tcl_UniCharAtIndex: index = 0} { string index \u4E4E\u25A 0 } "\u4E4E" test utf-8.3 {Tcl_UniCharAtIndex: index > 0} { string index abcd 2 -} {c} +} c test utf-8.4 {Tcl_UniCharAtIndex: index > 0} { string index \u4E4E\u25A\xFF\u543 2 } "\uFF" @@ -335,13 +758,25 @@ test utf-8.5 {Tcl_UniCharAtIndex: high surrogate} { test utf-8.6 {Tcl_UniCharAtIndex: low surrogate} { string index \uDC42 0 } "\uDC42" +test utf-8.7 {Tcl_UniCharAtIndex: Emoji} { + string index \U1F600 0 +} "\U1F600" +test utf-8.8 {Tcl_UniCharAtIndex: Emoji} { + string index \U1F600 1 +} {} test utf-9.1 {Tcl_UtfAtIndex: index = 0} { string range abcd 0 2 -} {abc} +} abc test utf-9.2 {Tcl_UtfAtIndex: index > 0} { string range \u4E4E\u25A\xFF\u543klmnop 1 5 } "\u25A\xFF\u543kl" +test utf-9.3 {Tcl_UtfAtIndex: index = 0, Emoji} { + string range \U1F600G 0 0 +} "\U1F600" +test utf-9.4 {Tcl_UtfAtIndex: index > 0, Emoji} tip389 { + string range \U1F600G 1 1 +} {} test utf-10.1 {Tcl_UtfBackslash: dst == NULL} { @@ -438,15 +873,21 @@ test utf-11.2 {Tcl_UtfToUpper} { string toupper abc } ABC test utf-11.3 {Tcl_UtfToUpper} { - string toupper \xE3AB -} \xC3AB + string toupper \xE3gh +} \xC3GH test utf-11.4 {Tcl_UtfToUpper} { - string toupper \u01E3AB -} \u01E2AB + string toupper \u01E3gh +} \u01E2GH test utf-11.5 {Tcl_UtfToUpper Georgian (new in Unicode 11)} { string toupper \u10D0\u1C90 } \u1C90\u1C90 -test utf-11.6 {Tcl_UtfToUpper low/high surrogate)} { +test utf-11.6 {Tcl_UtfToUpper beyond U+FFFF} {Uesc fullutf} { + string toupper \U10428 +} \U10400 +test utf-11.7 {Tcl_UtfToUpper beyond U+FFFF} {pairsTo4bytes} { + string toupper \uD801\uDC28 +} \uD801\uDC00 +test utf-11.8 {Tcl_UtfToUpper low/high surrogate)} { string toupper \uDC24\uD824 } \uDC24\uD824 @@ -457,17 +898,23 @@ test utf-12.2 {Tcl_UtfToLower} { string tolower ABC } abc test utf-12.3 {Tcl_UtfToLower} { - string tolower \xC3AB -} \xE3ab + string tolower \xC3GH +} \xE3gh test utf-12.4 {Tcl_UtfToLower} { - string tolower \u01E2AB -} \u01E3ab + string tolower \u01E2GH +} \u01E3gh test utf-12.5 {Tcl_UtfToLower Georgian (new in Unicode 11)} { string tolower \u10D0\u1C90 } \u10D0\u10D0 -test utf-12.6 {Tcl_UtfToUpper low/high surrogate)} { +test utf-12.6 {Tcl_UtfToLower low/high surrogate)} { string tolower \uDC24\uD824 } \uDC24\uD824 +test utf-12.7 {Tcl_UtfToLower beyond U+FFFF} {Uesc fullutf} { + string tolower \U10400 +} \U10428 +test utf-12.8 {Tcl_UtfToLower beyond U+FFFF} {pairsTo4bytes} { + string tolower \uD801\uDC00 +} \uD801\uDC28 test utf-13.1 {Tcl_UtfToTitle} { string totitle {} @@ -476,8 +923,8 @@ test utf-13.2 {Tcl_UtfToTitle} { string totitle abc } Abc test utf-13.3 {Tcl_UtfToTitle} { - string totitle \xE3AB -} \xC3ab + string totitle \xE3GH +} \xC3gh test utf-13.4 {Tcl_UtfToTitle} { string totitle \u01F3AB } \u01F2ab @@ -490,6 +937,12 @@ test utf-13.6 {Tcl_UtfToTitle Georgian (new in Unicode 11)} { test utf-13.7 {Tcl_UtfToTitle low/high surrogate)} { string totitle \uDC24\uD824 } \uDC24\uD824 +test utf-13.8 {Tcl_UtfToTitle beyond U+FFFF} {Uesc fullutf} { + string totitle \U10428 +} \U10400 +test utf-13.9 {Tcl_UtfToTitle beyond U+FFFF} {pairsTo4bytes} { + string totitle \uD801\uDC28 +} \uD801\uDC00 test utf-14.1 {Tcl_UtfNcasecmp} { string compare -nocase a b @@ -553,7 +1006,7 @@ test utf-20.1 {TclUniCharNcmp} { test utf-21.1 {TclUniCharIsAlnum} { # this returns 1 with Unicode 7 compliance string is alnum \u1040\u021F\u0220 -} {1} +} 1 test utf-21.2 {unicode alnum char in regc_locale.c} { # this returns 1 with Unicode 7 compliance list [regexp {^[[:alnum:]]+$} \u1040\u021F\u0220] [regexp {^\w+$} \u1040\u021F\u0220_\u203F\u2040\u2054\uFE33\uFE34\uFE4D\uFE4E\uFE4F\uFF3F] @@ -565,39 +1018,39 @@ test utf-21.3 {unicode print char in regc_locale.c} { test utf-21.4 {TclUniCharIsGraph} { # [Bug 3464428] string is graph \u0120 -} {1} +} 1 test utf-21.5 {unicode graph char in regc_locale.c} { # [Bug 3464428] regexp {^[[:graph:]]+$} \u0120 -} {1} +} 1 test utf-21.6 {TclUniCharIsGraph} { # [Bug 3464428] string is graph \xA0 -} {0} +} 0 test utf-21.7 {unicode graph char in regc_locale.c} { # [Bug 3464428] regexp {[[:graph:]]} \x20\xA0\u2028\u2029 -} {0} +} 0 test utf-21.8 {TclUniCharIsPrint} { # [Bug 3464428] string is print \x09 -} {0} +} 0 test utf-21.9 {unicode print char in regc_locale.c} { # [Bug 3464428] regexp {[[:print:]]} \x09 -} {0} +} 0 test utf-21.10 {unicode print char in regc_locale.c} { # [Bug 3464428] regexp {[[:print:]]} \x09 -} {0} +} 0 test utf-21.11 {TclUniCharIsControl} { # [Bug 3464428] string is control \x00\x1F\xAD\u0605\u061C\u180E\u2066\uFEFF -} {1} +} 1 test utf-21.12 {unicode control char in regc_locale.c} { # [Bug 3464428], [Bug a876646efe] regexp {^[[:cntrl:]]*$} \x00\x1F\xAD\u0605\u061C\u180E\u2066\uFEFF -} {1} +} 1 test utf-22.1 {TclUniCharIsWordChar} { string wordend "xyz123_bar fg" 0 @@ -609,32 +1062,38 @@ test utf-22.2 {TclUniCharIsWordChar} { test utf-23.1 {TclUniCharIsAlpha} { # this returns 1 with Unicode 7 compliance string is alpha \u021F\u0220\u037F\u052F -} {1} +} 1 test utf-23.2 {unicode alpha char in regc_locale.c} { # this returns 1 with Unicode 7 compliance regexp {^[[:alpha:]]+$} \u021F\u0220\u037F\u052F -} {1} +} 1 test utf-24.1 {TclUniCharIsDigit} { # this returns 1 with Unicode 7 compliance string is digit \u1040\uABF0 -} {1} +} 1 test utf-24.2 {unicode digit char in regc_locale.c} { # this returns 1 with Unicode 7 compliance list [regexp {^[[:digit:]]+$} \u1040\uABF0] [regexp {^\d+$} \u1040\uABF0] } {1 1} test utf-24.3 {TclUniCharIsSpace} { + # this returns 1 with Unicode 7 compliance + string is space \u1680\u180E\u202F +} 1 +test utf-24.4 {unicode space char in regc_locale.c} { + # this returns 1 with Unicode 7 compliance + list [regexp {^[[:space:]]+$} \u1680\u180E\u202F] [regexp {^\s+$} \u1680\u180E\u202F] +} {1 1} +test utf-24.5 {TclUniCharIsSpace} tip413 { # this returns 1 with Unicode 7/TIP 413 compliance string is space \x85\u1680\u180E\u200B\u202F\u2060 -} {1} -test utf-24.4 {unicode space char in regc_locale.c} { +} 1 +test utf-24.6 {unicode space char in regc_locale.c} tip413 { # this returns 1 with Unicode 7/TIP 413 compliance list [regexp {^[[:space:]]+$} \x85\u1680\u180E\u200B\u202F\u2060] [regexp {^\s+$} \x85\u1680\u180E\u200B\u202F\u2060] } {1 1} -testConstraint teststringobj [llength [info commands teststringobj]] - test utf-25.1 {Tcl_UniCharNcasecmp} -constraints teststringobj \ -setup { testobj freeallvars |