summaryrefslogtreecommitdiffstats
path: root/tests/utf.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-05-06 08:15:49 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-05-06 08:15:49 (GMT)
commit73f359fe17c344733d247c82eb62e6e4f8313abf (patch)
tree771992f7df3d196b1ce8b1508fa1666efa735361 /tests/utf.test
parent96f7e93f0b671b1d35f78a5e3058f9a83e2caedc (diff)
parent22751e62a6fe567905f34d7e485e73142d142a1e (diff)
downloadtcl-73f359fe17c344733d247c82eb62e6e4f8313abf.zip
tcl-73f359fe17c344733d247c82eb62e6e4f8313abf.tar.gz
tcl-73f359fe17c344733d247c82eb62e6e4f8313abf.tar.bz2
Merge 8.5.
Make testcases utf-7.20.[01] content the same as in core-8-5-branch, core-8-branch and trunk (0xF4 -> 0xF2)
Diffstat (limited to 'tests/utf.test')
-rw-r--r--tests/utf.test20
1 files changed, 9 insertions, 11 deletions
diff --git a/tests/utf.test b/tests/utf.test
index 83eaa32..0a97daa 100644
--- a/tests/utf.test
+++ b/tests/utf.test
@@ -13,8 +13,6 @@ if {[lsearch [namespace children] ::tcltest] == -1} {
namespace import -force ::tcltest::*
}
-namespace path ::tcl::mathop
-
::tcltest::loadTestedCommands
catch [list package require -exact Tcltest [info patchlevel]]
@@ -24,8 +22,8 @@ testConstraint utf16 [expr {[string length [format %c 0x10000]] == 2}]
testConstraint ucs4 [expr {[testConstraint fullutf]
&& [string length [format %c 0x10000]] == 1}]
-testConstraint Uesc [eq \U0041 A]
-testConstraint pre388 [eq \x741 A]
+testConstraint Uesc [expr {"\U0041" eq "A"}]
+testConstraint pre388 [expr {"\x741" eq "A"}]
testConstraint pairsTo4bytes [expr {[llength [info commands teststringbytes]]
&& [string length [teststringbytes \uD83D\uDCA9]] == 4}]
@@ -37,7 +35,7 @@ testConstraint teststringobj [llength [info commands teststringobj]]
testConstraint testutfnext [llength [info commands testutfnext]]
testConstraint testutfprev [llength [info commands testutfprev]]
-testConstraint tip413 [eq {} [string trim \x00]]
+testConstraint tip413 [expr {[string trim \x00] eq {}}]
catch {unset x}
@@ -816,11 +814,11 @@ test utf-7.19.1 {Tcl_UtfPrev} {testutfprev fullutf} {
testutfprev A\xF8\xA0\xA0\xA0
} 4
test utf-7.20.0 {Tcl_UtfPrev} {testutfprev ucs2} {
- testutfprev A\xF4\xA0\xA0\xA0
+ testutfprev A\xF2\xA0\xA0\xA0
} 2
test utf-7.20.1 {Tcl_UtfPrev} {testutfprev fullutf} {
- testutfprev A\xF4\xA0\xA0\xA0
-} 4
+ testutfprev A\xF2\xA0\xA0\xA0
+} 1
test utf-7.21.0 {Tcl_UtfPrev} {testutfprev ucs2} {
testutfprev A\xE8\xA0\xA0\xA0
} 2
@@ -1229,7 +1227,7 @@ test utf-11.5 {Tcl_UtfToUpper Georgian (new in Unicode 11)} {
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} {
+test utf-11.7 {Tcl_UtfToUpper beyond U+FFFF} fullutf {
string toupper \uD801\uDC28
} \uD801\uDC00
test utf-11.8 {Tcl_UtfToUpper low/high surrogate)} {
@@ -1257,7 +1255,7 @@ test utf-12.6 {Tcl_UtfToLower low/high surrogate)} {
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} {
+test utf-12.8 {Tcl_UtfToLower beyond U+FFFF} fullutf {
string tolower \uD801\uDC00
} \uD801\uDC28
@@ -1285,7 +1283,7 @@ test utf-13.7 {Tcl_UtfToTitle low/high surrogate)} {
test utf-13.8 {Tcl_UtfToTitle beyond U+FFFF} {Uesc fullutf} {
string totitle \U10428\U10400
} \U10400\U10428
-test utf-13.9 {Tcl_UtfToTitle beyond U+FFFF} pairsTo4bytes {
+test utf-13.9 {Tcl_UtfToTitle beyond U+FFFF} fullutf {
string totitle \uD801\uDC28\uD801\uDC00
} \uD801\uDC00\uD801\uDC28