summaryrefslogtreecommitdiffstats
path: root/tests/utf.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-03-22 16:12:20 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-03-22 16:12:20 (GMT)
commitd4c27c94668a30f48edee251104255b27230107e (patch)
tree18d63e36c14813cb8ff121a3dee185d844f0d3c5 /tests/utf.test
parenta2b77984681b66f6c73268c8b09f61be4e47570f (diff)
downloadtcl-d4c27c94668a30f48edee251104255b27230107e.zip
tcl-d4c27c94668a30f48edee251104255b27230107e.tar.gz
tcl-d4c27c94668a30f48edee251104255b27230107e.tar.bz2
ucs4 -> utf32
Diffstat (limited to 'tests/utf.test')
-rw-r--r--tests/utf.test46
1 files changed, 23 insertions, 23 deletions
diff --git a/tests/utf.test b/tests/utf.test
index c79492e..c0d64e2 100644
--- a/tests/utf.test
+++ b/tests/utf.test
@@ -19,7 +19,7 @@ catch [list package require -exact tcl::test [info patchlevel]]
testConstraint ucs2 [expr {[format %c 0x010000] eq "\uFFFD"}]
testConstraint fullutf [expr {[format %c 0x010000] ne "\uFFFD"}]
testConstraint utf16 [expr {[string length [format %c 0x10000]] == 2}]
-testConstraint ucs4 [expr {[testConstraint fullutf]
+testConstraint utf32 [expr {[testConstraint fullutf]
&& [string length [format %c 0x10000]] == 1}]
testConstraint Uesc [expr {"\U0041" eq "A"}]
@@ -131,7 +131,7 @@ test utf-2.8.0 {Tcl_UtfToUniChar: lead (4-byte) followed by 3 trail} {ucs2 testb
test utf-2.8.1 {Tcl_UtfToUniChar: lead (4-byte) followed by 3 trail} utf16 {
string length 𐀀
} 2
-test utf-2.8.2 {Tcl_UtfToUniChar: lead (4-byte) followed by 3 trail} ucs4 {
+test utf-2.8.2 {Tcl_UtfToUniChar: lead (4-byte) followed by 3 trail} utf32 {
string length 𐀀
} 1
test utf-2.9.0 {Tcl_UtfToUniChar: lead (4-byte) followed by 3 trail} {ucs2 testbytestring} {
@@ -140,7 +140,7 @@ test utf-2.9.0 {Tcl_UtfToUniChar: lead (4-byte) followed by 3 trail} {ucs2 testb
test utf-2.9.1 {Tcl_UtfToUniChar: lead (4-byte) followed by 3 trail} utf16 {
string length \U10FFFF
} 2
-test utf-2.9.2 {Tcl_UtfToUniChar: lead (4-byte) followed by 3 trail} ucs4 {
+test utf-2.9.2 {Tcl_UtfToUniChar: lead (4-byte) followed by 3 trail} utf32 {
string length \U10FFFF
} 1
test utf-2.10 {Tcl_UtfToUniChar: lead (4-byte) followed by 3 trail, underflow} testbytestring {
@@ -194,7 +194,7 @@ test utf-4.11 {Tcl_NumUtfChars: 3 bytes of 4-byte UTF-8 characater} {testnumutfc
test utf-4.12.0 {Tcl_NumUtfChars: #4-byte UTF-8 character} {testnumutfchars testbytestring ucs2} {
testnumutfchars [testbytestring \xF0\x9F\x92\xA9] end
} 2
-test utf-4.12.1 {Tcl_NumUtfChars: #4-byte UTF-8 character} {testnumutfchars testbytestring ucs4} {
+test utf-4.12.1 {Tcl_NumUtfChars: #4-byte UTF-8 character} {testnumutfchars testbytestring utf32} {
testnumutfchars [testbytestring \xF0\x9F\x92\xA9] end
} 1
test utf-4.13 {Tcl_NumUtfChars: end of string} {testnumutfchars testbytestring} {
@@ -878,7 +878,7 @@ test utf-8.4 {Tcl_UniCharAtIndex: index > 0} {
test utf-8.5.0 {Tcl_UniCharAtIndex: high surrogate} ucs2 {
string index \uD842 0
} \uD842
-test utf-8.5.1 {Tcl_UniCharAtIndex: high surrogate} ucs4 {
+test utf-8.5.1 {Tcl_UniCharAtIndex: high surrogate} utf32 {
string index \uD842 0
} \uD842
test utf-8.5.2 {Tcl_UniCharAtIndex: high surrogate} utf16 {
@@ -890,7 +890,7 @@ test utf-8.6 {Tcl_UniCharAtIndex: low surrogate} {
test utf-8.7.0 {Tcl_UniCharAtIndex: Emoji} ucs2 {
string index \uD83D\uDE00G 0
} \uD83D
-test utf-8.7.1 {Tcl_UniCharAtIndex: Emoji} ucs4 {
+test utf-8.7.1 {Tcl_UniCharAtIndex: Emoji} utf32 {
string index 😀G 0
} 😀
test utf-8.7.2 {Tcl_UniCharAtIndex: Emoji} utf16 {
@@ -899,7 +899,7 @@ test utf-8.7.2 {Tcl_UniCharAtIndex: Emoji} utf16 {
test utf-8.8.0 {Tcl_UniCharAtIndex: Emoji} ucs2 {
string index \uD83D\uDE00G 1
} \uDE00
-test utf-8.8.1 {Tcl_UniCharAtIndex: Emoji} ucs4 {
+test utf-8.8.1 {Tcl_UniCharAtIndex: Emoji} utf32 {
string index 😀G 1
} G
test utf-8.8.2 {Tcl_UniCharAtIndex: Emoji} utf16 {
@@ -908,7 +908,7 @@ test utf-8.8.2 {Tcl_UniCharAtIndex: Emoji} utf16 {
test utf-8.9.0 {Tcl_UniCharAtIndex: Emoji} ucs2 {
string index \uD83D\uDE00G 2
} G
-test utf-8.9.1 {Tcl_UniCharAtIndex: Emoji} ucs4 {
+test utf-8.9.1 {Tcl_UniCharAtIndex: Emoji} utf32 {
string index 😀G 2
} {}
test utf-8.9.2 {Tcl_UniCharAtIndex: Emoji} utf16 {
@@ -917,7 +917,7 @@ test utf-8.9.2 {Tcl_UniCharAtIndex: Emoji} utf16 {
test utf-8.10.0 {Tcl_UniCharAtIndex: Emoji} ucs2 {
string index 😀G 0
} \uFFFD
-test utf-8.10.1 {Tcl_UniCharAtIndex: Emoji} ucs4 {
+test utf-8.10.1 {Tcl_UniCharAtIndex: Emoji} utf32 {
string index 😀G 0
} 😀
test utf-8.10.2 {Tcl_UniCharAtIndex: Emoji} utf16 {
@@ -926,7 +926,7 @@ test utf-8.10.2 {Tcl_UniCharAtIndex: Emoji} utf16 {
test utf-8.11.0 {Tcl_UniCharAtIndex: Emoji} ucs2 {
string index 😀G 1
} G
-test utf-8.11.1 {Tcl_UniCharAtIndex: Emoji} ucs4 {
+test utf-8.11.1 {Tcl_UniCharAtIndex: Emoji} utf32 {
string index 😀G 1
} G
test utf-8.11.2 {Tcl_UniCharAtIndex: Emoji} utf16 {
@@ -935,7 +935,7 @@ test utf-8.11.2 {Tcl_UniCharAtIndex: Emoji} utf16 {
test utf-8.12.0 {Tcl_UniCharAtIndex: Emoji} ucs2 {
string index 😀G 2
} {}
-test utf-8.12.1 {Tcl_UniCharAtIndex: Emoji} ucs4 {
+test utf-8.12.1 {Tcl_UniCharAtIndex: Emoji} utf32 {
string index 😀G 2
} {}
test utf-8.12.2 {Tcl_UniCharAtIndex: Emoji} utf16 {
@@ -951,7 +951,7 @@ test utf-9.2 {Tcl_UtfAtIndex: index > 0} {
test utf-9.3.0 {Tcl_UtfAtIndex: index = 0, Emoji} ucs2 {
string range \uD83D\uDE00G 0 0
} \uD83D
-test utf-9.3.1 {Tcl_UtfAtIndex: index = 0, Emoji} ucs4 {
+test utf-9.3.1 {Tcl_UtfAtIndex: index = 0, Emoji} utf32 {
string range 😀G 0 0
} 😀
test utf-9.3.2 {Tcl_UtfAtIndex: index = 0, Emoji} utf16 {
@@ -960,7 +960,7 @@ test utf-9.3.2 {Tcl_UtfAtIndex: index = 0, Emoji} utf16 {
test utf-9.4.0 {Tcl_UtfAtIndex: index > 0, Emoji} ucs2 {
string range \uD83D\uDE00G 1 1
} \uDE00
-test utf-9.4.1 {Tcl_UtfAtIndex: index > 0, Emoji} ucs4 {
+test utf-9.4.1 {Tcl_UtfAtIndex: index > 0, Emoji} utf32 {
string range 😀G 1 1
} G
test utf-9.4.2 {Tcl_UtfAtIndex: index > 0, Emoji} utf16 {
@@ -969,7 +969,7 @@ test utf-9.4.2 {Tcl_UtfAtIndex: index > 0, Emoji} utf16 {
test utf-9.5.0 {Tcl_UtfAtIndex: index > 0, Emoji} ucs2 {
string range \uD83D\uDE00G 2 2
} G
-test utf-9.5.1 {Tcl_UtfAtIndex: index > 0, Emoji} ucs4 {
+test utf-9.5.1 {Tcl_UtfAtIndex: index > 0, Emoji} utf32 {
string range 😀G 2 2
} {}
test utf-9.5.2 {Tcl_UtfAtIndex: index > 0, Emoji} utf16 {
@@ -978,7 +978,7 @@ test utf-9.5.2 {Tcl_UtfAtIndex: index > 0, Emoji} utf16 {
test utf-9.6.0 {Tcl_UtfAtIndex: index = 0, Emoji} ucs2 {
string range 😀G 0 0
} \uFFFD
-test utf-9.6.1 {Tcl_UtfAtIndex: index = 0, Emoji} ucs4 {
+test utf-9.6.1 {Tcl_UtfAtIndex: index = 0, Emoji} utf32 {
string range 😀G 0 0
} 😀
test utf-9.6.2 {Tcl_UtfAtIndex: index = 0, Emoji} utf16 {
@@ -987,7 +987,7 @@ test utf-9.6.2 {Tcl_UtfAtIndex: index = 0, Emoji} utf16 {
test utf-9.7.0 {Tcl_UtfAtIndex: index > 0, Emoji} ucs2 {
string range 😀G 1 1
} G
-test utf-9.7.1 {Tcl_UtfAtIndex: index > 0, Emoji} ucs4 {
+test utf-9.7.1 {Tcl_UtfAtIndex: index > 0, Emoji} utf32 {
string range 😀G 1 1
} G
test utf-9.7.2 {Tcl_UtfAtIndex: index > 0, Emoji} utf16 {
@@ -996,7 +996,7 @@ test utf-9.7.2 {Tcl_UtfAtIndex: index > 0, Emoji} utf16 {
test utf-9.8.0 {Tcl_UtfAtIndex: index > 0, Emoji} ucs2 {
string range 😀G 2 2
} {}
-test utf-9.8.1 {Tcl_UtfAtIndex: index > 0, Emoji} ucs4 {
+test utf-9.8.1 {Tcl_UtfAtIndex: index > 0, Emoji} utf32 {
string range 😀G 2 2
} {}
test utf-9.8.2 {Tcl_UtfAtIndex: index > 0, Emoji} utf16 {
@@ -1227,10 +1227,10 @@ test utf-19.1 {TclUniCharLen} -body {
unset -nocomplain foo
} -result {1 4}
-test utf-20.1 {TclUniCharNcmp} ucs4 {
+test utf-20.1 {TclUniCharNcmp} utf32 {
string compare [string range [format %c 0xFFFF] 0 0] [string range [format %c 0x10000] 0 0]
} -1
-test utf-20.2 {[4c591fa487] TclUniCharNcmp/TclUtfNcmp} ucs4 {
+test utf-20.2 {[4c591fa487] TclUniCharNcmp/TclUtfNcmp} utf32 {
set one [format %c 0xFFFF]
set two [format %c 0x10000]
set first [string compare $one $two]
@@ -1357,10 +1357,10 @@ UniCharCaseCmpTest < a b
UniCharCaseCmpTest > b a
UniCharCaseCmpTest > B a
UniCharCaseCmpTest > aBcB abca
-UniCharCaseCmpTest < \uFFFF [format %c 0x10000] ucs4
-UniCharCaseCmpTest < \uFFFF \U10000 ucs4
-UniCharCaseCmpTest > [format %c 0x10000] \uFFFF ucs4
-UniCharCaseCmpTest > \U10000 \uFFFF ucs4
+UniCharCaseCmpTest < \uFFFF [format %c 0x10000] utf32
+UniCharCaseCmpTest < \uFFFF \U10000 utf32
+UniCharCaseCmpTest > [format %c 0x10000] \uFFFF utf32
+UniCharCaseCmpTest > \U10000 \uFFFF utf32
test utf-26.1 {Tcl_UniCharDString} -setup {