summaryrefslogtreecommitdiffstats
path: root/tests/encoding.test
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2023-03-16 18:11:08 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2023-03-16 18:11:08 (GMT)
commite7fc2e1e1d845b964cbf8c084865e83d1ced239f (patch)
treecbf743d53c85e2e497a9a02a5afdb5750d86c25b /tests/encoding.test
parent527e79c3a8b0d8df5cce3676a94700785584ef06 (diff)
parent88f9f54d4c4e23a4d20b82b40b385c6d558013f9 (diff)
downloadtcl-e7fc2e1e1d845b964cbf8c084865e83d1ced239f.zip
tcl-e7fc2e1e1d845b964cbf8c084865e83d1ced239f.tar.gz
tcl-e7fc2e1e1d845b964cbf8c084865e83d1ced239f.tar.bz2
Merge 9.0
Diffstat (limited to 'tests/encoding.test')
-rw-r--r--tests/encoding.test16
1 files changed, 11 insertions, 5 deletions
diff --git a/tests/encoding.test b/tests/encoding.test
index 407bd28..1be6fed 100644
--- a/tests/encoding.test
+++ b/tests/encoding.test
@@ -623,7 +623,7 @@ test encoding-17.12 {Utf32ToUtfProc} -body {
test encoding-18.1 {TableToUtfProc on invalid input} -body {
list [catch {encoding convertto jis0208 \\} res] $res
-} -result {1 {unexpected character at index 0: 'U+00005C'}}
+} -result {0 !)}
test encoding-18.2 {TableToUtfProc on invalid input with -profile strict} -body {
list [catch {encoding convertto -profile strict jis0208 \\} res] $res
} -result {1 {unexpected character at index 0: 'U+00005C'}}
@@ -810,8 +810,11 @@ test encoding-24.17 {Parse valid or invalid utf-8} -constraints testbytestring -
test encoding-24.18 {Parse valid or invalid utf-8} -constraints testbytestring -body {
encoding convertto utf-8 [testbytestring "Z\xE0\x80xxxxxx"]
} -result "Z\xC3\xA0\xE2\x82\xACxxxxxx"
-test encoding-24.19 {Parse valid or invalid utf-8} -body {
- encoding convertto utf-8 "ZX\uD800"
+test encoding-24.19.1 {Parse valid or invalid utf-8} -body {
+ encoding convertto -profile tcl8 utf-8 "ZX\uD800"
+} -result ZX\xED\xA0\x80
+test encoding-24.19.2 {Parse valid or invalid utf-8} -body {
+ encoding convertto -profile strict utf-8 "ZX\uD800"
} -returnCodes 1 -match glob -result "unexpected character at index 2: 'U+00D800'"
test encoding-24.20 {Parse with -profile tcl8 but without providing encoding} -body {
encoding convertfrom -profile tcl8 "\x20"
@@ -867,9 +870,12 @@ test encoding-24.36 {Parse invalid utf-8 with -profile strict} -body {
test encoding-24.37 {Parse invalid utf-8 with -profile tcl8} -body {
encoding convertfrom -profile tcl8 utf-8 \xED\xA0\x80
} -result \uD800
-test encoding-24.38 {Try to generate invalid utf-8} -body {
- encoding convertto utf-8 \uD800
+test encoding-24.38.1 {Try to generate invalid utf-8} -body {
+ encoding convertto -profile tcl8 utf-8 \uD800
} -returnCodes 1 -result {unexpected character at index 0: 'U+00D800'}
+test encoding-24.38.2 {Try to generate invalid utf-8} -body {
+ encoding convertto -profile strict utf-8 \uD800
+} -result \xED\xA0\x80
test encoding-24.39 {Try to generate invalid utf-8 with -profile strict} -body {
encoding convertto -profile strict utf-8 \uD800
} -returnCodes 1 -result {unexpected character at index 0: 'U+00D800'}