summaryrefslogtreecommitdiffstats
path: root/tests/encoding.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-09-20 08:34:26 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-09-20 08:34:26 (GMT)
commit35e684f318e349e397b9647cbc2ded8854ec5825 (patch)
treed97676e3f5a1d9c94bbe4d7d08b1f4e01a4deefd /tests/encoding.test
parente6cc6f599aa7c9874516d068176a18f73e8c0bb5 (diff)
parent98f9c60d3a969593c2e8695d4b6c82ee1fa44b70 (diff)
downloadtcl-35e684f318e349e397b9647cbc2ded8854ec5825.zip
tcl-35e684f318e349e397b9647cbc2ded8854ec5825.tar.gz
tcl-35e684f318e349e397b9647cbc2ded8854ec5825.tar.bz2
Merge 8.7
Diffstat (limited to 'tests/encoding.test')
-rw-r--r--tests/encoding.test14
1 files changed, 5 insertions, 9 deletions
diff --git a/tests/encoding.test b/tests/encoding.test
index 49d9066..712991c 100644
--- a/tests/encoding.test
+++ b/tests/encoding.test
@@ -40,9 +40,6 @@ testConstraint testbytestring [llength [info commands testbytestring]]
testConstraint teststringbytes [llength [info commands teststringbytes]]
testConstraint exec [llength [info commands exec]]
testConstraint testgetencpath [llength [info commands testgetencpath]]
-testConstraint fullutf [expr {[format %c 0x010000] ne "\uFFFD"}]
-testConstraint utf32 [expr {[testConstraint fullutf]
- && [string length [format %c 0x10000]] == 1}]
# TclInitEncodingSubsystem is tested by the rest of this file
# TclFinalizeEncodingSubsystem is not currently tested
@@ -343,7 +340,7 @@ test encoding-15.5 {UtfToUtfProc emoji character input} {
set y [encoding convertfrom utf-8 \xF0\x9F\x98\x82]
list [string length $x] $y
} "4 😂"
-test encoding-15.6 {UtfToUtfProc emoji character output} utf32 {
+test encoding-15.6 {UtfToUtfProc emoji character output} {
set x \uDE02\uD83D\uDE02\uD83D
set y [encoding convertto -profile tcl8 utf-8 \uDE02\uD83D\uDE02\uD83D]
binary scan $y H* z
@@ -506,7 +503,7 @@ test encoding-16.8 {Utf32ToUtfProc} -body {
set val [encoding convertfrom -profile tcl8 utf-32 \x41\x00\x00\x41]
list $val [format %x [scan $val %c]]
} -result "\uFFFD fffd"
-test encoding-16.9 {Utf32ToUtfProc} -constraints utf32 -body {
+test encoding-16.9 {Utf32ToUtfProc} -body {
encoding convertfrom -profile tcl8 utf-32le \x00\xD8\x00\x00
} -result \uD800
test encoding-16.10 {Utf32ToUtfProc} -body {
@@ -515,7 +512,7 @@ test encoding-16.10 {Utf32ToUtfProc} -body {
test encoding-16.11 {Utf32ToUtfProc} -body {
encoding convertfrom -profile tcl8 utf-32le \x00\xD8\x00\x00\x00\xDC\x00\x00
} -result \uD800\uDC00
-test encoding-16.12 {Utf32ToUtfProc} -constraints utf32 -body {
+test encoding-16.12 {Utf32ToUtfProc} -body {
encoding convertfrom -profile tcl8 utf-32le \x00\xDC\x00\x00\x00\xD8\x00\x00
} -result \uDC00\uD800
test encoding-16.13 {Utf16ToUtfProc} -body {
@@ -559,8 +556,7 @@ test {encoding-16.19 strict} {Utf16ToUtfProc, bug [d19fe0a5b]} -body {
test {encoding-16.19 tcl8} {Utf16ToUtfProc, bug [d19fe0a5b]} -body {
encoding convertfrom -profile tcl8 utf-16 "\x41\x41\x41"
} -result \u4141\uFFFD
-test encoding-16.20 {utf16ToUtfProc, bug [d19fe0a5b]} \
- -constraints deprecated -body {
+test encoding-16.20 {utf16ToUtfProc, bug [d19fe0a5b]} -body {
encoding convertfrom utf-16 "\xD8\xD8"
} -result \uD8D8
test encoding-16.21.tcl8 {Utf32ToUtfProc, bug [d19fe0a5b]} -body {
@@ -869,7 +865,7 @@ test encoding-24.33 {Try to generate invalid utf-8} -body {
test encoding-24.34 {Try to generate invalid utf-8 with -profile tcl8} -body {
encoding convertto -profile tcl8 utf-8 \uFFFF
} -result \xEF\xBF\xBF
-test encoding-24.35 {Parse invalid utf-8} -constraints utf32 -body {
+test encoding-24.35 {Parse invalid utf-8} -body {
encoding convertfrom -profile tcl8 utf-8 \xED\xA0\x80
} -result \uD800
test encoding-24.36 {Parse invalid utf-8 with -profile strict} -body {