diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-02-28 12:58:54 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-02-28 12:58:54 (GMT) |
commit | 4a07460db0fde8052d2d749cb79d56446d2eae48 (patch) | |
tree | c25efe3d59c7acaa369cfdbd012b5d3a25b1d2c0 /tests | |
parent | 4af90e27e5e22978b56d6cb5d0d1ecd90af0f48f (diff) | |
parent | 3929a73ee0fd5945e8f186f495229f3dc98877de (diff) | |
download | tcl-4a07460db0fde8052d2d749cb79d56446d2eae48.zip tcl-4a07460db0fde8052d2d749cb79d56446d2eae48.tar.gz tcl-4a07460db0fde8052d2d749cb79d56446d2eae48.tar.bz2 |
Implement TIP #497: Full support for Unicode planes 1-16.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/string.test | 14 | ||||
-rw-r--r-- | tests/stringObj.test | 10 | ||||
-rw-r--r-- | tests/utf.test | 10 |
3 files changed, 17 insertions, 17 deletions
diff --git a/tests/string.test b/tests/string.test index b58aea2..9b51702 100644 --- a/tests/string.test +++ b/tests/string.test @@ -31,7 +31,7 @@ proc makeShared {s} {uplevel 1 [list lappend copy $s]; return $s} testConstraint testobj [expr {[info commands testobj] ne {}}] testConstraint testindexobj [expr {[info commands testindexobj] ne {}}] testConstraint testevalex [expr {[info commands testevalex] ne {}}] -testConstraint tip389 [expr {[string length \U010000] == 2}] +testConstraint fullutf [expr {[string length \U010000] == 1}] # Used for constraining memory leak tests testConstraint memory [llength [info commands memory]] @@ -505,9 +505,9 @@ test string-5.19.$noComp {string index, bytearray object out of bounds} { test string-5.20.$noComp {string index, bytearray object out of bounds} { run {string index [binary format I* {0x50515253 0x52}] 20} } {} -test string-5.21.$noComp {string index, surrogates, bug [11ae2be95dac9417]} tip389 { +test string-5.21.$noComp {string index, surrogates, bug [11ae2be95dac9417]} fullutf { run {list [string index a\U100000b 1] [string index a\U100000b 2] [string index a\U100000b 3]} -} [list \U100000 {} b] +} [list \U100000 b {}] proc largest_int {} { @@ -1502,9 +1502,9 @@ test string-12.22.$noComp {string range, shimmering binary/index} { binary scan $s a* x run {string range $s $s end} } 000000001 -test string-12.23.$noComp {string range, surrogates, bug [11ae2be95dac9417]} tip389 { +test string-12.23.$noComp {string range, surrogates, bug [11ae2be95dac9417]} fullutf { run {list [string range a\U100000b 1 1] [string range a\U100000b 2 2] [string range a\U100000b 3 3]} -} [list \U100000 {} b] +} [list \U100000 b {}] test string-13.1.$noComp {string repeat} { list [catch {run {string repeat}} msg] $msg @@ -1743,10 +1743,10 @@ test string-17.7.$noComp {string totitle, unicode} { test string-17.8.$noComp {string totitle, compiled} { lindex [run {string totitle [list aa bb [list cc]]}] 0 } Aa -test string-17.9.$noComp {string totitle, surrogates, bug [11ae2be95dac9417]} tip389 { +test string-17.9.$noComp {string totitle, surrogates, bug [11ae2be95dac9417]} fullutf { run {list [string totitle a\U118c0c 1 1] [string totitle a\U118c0c 2 2] \ [string totitle a\U118c0c 3 3]} -} [list a\U118a0c a\U118c0C a\U118c0C] +} [list a\U118a0c a\U118c0C a\U118c0c] test string-18.1.$noComp {string trim} { list [catch {run {string trim}} msg] $msg diff --git a/tests/stringObj.test b/tests/stringObj.test index 8b10897..9c32dd6 100644 --- a/tests/stringObj.test +++ b/tests/stringObj.test @@ -23,7 +23,7 @@ catch [list package require -exact Tcltest [info patchlevel]] testConstraint testobj [llength [info commands testobj]] testConstraint testbytestring [llength [info commands testbytestring]] testConstraint testdstring [llength [info commands testdstring]] -testConstraint tip389 [expr {[string length \U010000] == 2}] +testConstraint fullutf [expr {[string length \U010000] == 1}] test stringObj-1.1 {string type registration} testobj { set t [testobj types] @@ -465,19 +465,19 @@ test stringObj-15.4 {Tcl_Append*ToObj: self appends} testobj { teststringobj set 1 foo teststringobj appendself 1 3 } foo -test stringObj-15.5 {Tcl_Append*ToObj: self appends} {testobj tip389} { +test stringObj-15.5 {Tcl_Append*ToObj: self appends} {testobj fullutf} { teststringobj set 1 foo teststringobj appendself2 1 0 } foofoo -test stringObj-15.6 {Tcl_Append*ToObj: self appends} {testobj tip389} { +test stringObj-15.6 {Tcl_Append*ToObj: self appends} {testobj fullutf} { teststringobj set 1 foo teststringobj appendself2 1 1 } foooo -test stringObj-15.7 {Tcl_Append*ToObj: self appends} {testobj tip389} { +test stringObj-15.7 {Tcl_Append*ToObj: self appends} {testobj fullutf} { teststringobj set 1 foo teststringobj appendself2 1 2 } fooo -test stringObj-15.8 {Tcl_Append*ToObj: self appends} {testobj tip389} { +test stringObj-15.8 {Tcl_Append*ToObj: self appends} {testobj fullutf} { teststringobj set 1 foo teststringobj appendself2 1 3 } foo diff --git a/tests/utf.test b/tests/utf.test index 1d0f63a..adcbb87 100644 --- a/tests/utf.test +++ b/tests/utf.test @@ -21,7 +21,7 @@ testConstraint testbytestring [llength [info commands testbytestring]] catch {unset x} # Some tests require support for 4-byte UTF-8 sequences -testConstraint tip389 [expr {[string length \U010000] == 2}] +testConstraint fullutf [expr {[string length \U010000] == 1}] test utf-1.1 {Tcl_UniCharToUtf: 1 byte sequences} testbytestring { expr {"\x01" eq [testbytestring "\x01"]} @@ -84,12 +84,12 @@ test utf-2.6 {Tcl_UtfToUniChar: lead (3-byte) followed by 1 trail} testbytestrin 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 { +test utf-2.8 {Tcl_UtfToUniChar: lead (4-byte) followed by 3 trail} -constraints {fullutf testbytestring} -body { 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 { +} -result {1} +test utf-2.9 {Tcl_UtfToUniChar: lead (4-byte) followed by 3 trail} -constraints {fullutf testbytestring} -body { string length [testbytestring "\xF4\x8F\xBF\xBF"] -} -result {2} +} -result {1} test utf-2.10 {Tcl_UtfToUniChar: lead (4-byte) followed by 3 trail, underflow} testbytestring { string length [testbytestring "\xF0\x8F\xBF\xBF"] } {4} |