summaryrefslogtreecommitdiffstats
path: root/tests/encoding.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/encoding.test')
-rw-r--r--tests/encoding.test23
1 files changed, 13 insertions, 10 deletions
diff --git a/tests/encoding.test b/tests/encoding.test
index 506ab2c..edca5f0 100644
--- a/tests/encoding.test
+++ b/tests/encoding.test
@@ -588,13 +588,13 @@ test encoding-16.22 {Utf16ToUtfProc, strict, bug [db7a085bd9]} -body {
test encoding-16.23 {Utf16ToUtfProc, strict, bug [db7a085bd9]} -body {
encoding convertfrom -profile strict utf-16le \x00\xDC
} -returnCodes 1 -result {unexpected byte sequence starting at index 0: '\x00'}
-test {encoding-24.4 utf-8 invalid strict} {Parse invalid utf-8, strict} -body {
- string length [encoding convertfrom -profile strict utf-8 "\xC0\x80"]
-} -returnCodes 1 -result {unexpected byte sequence starting at index 0: '\xC0'}
-test {encoding-24.4 utf-8 invalid tcl8} {UtfToUtfProc utf-8} {
- encoding convertfrom -profile tcl8 utf-8 \xC0\x80
-} \x00
-test encoding-16.25 {Utf32ToUtfProc} -body {
+test encoding-16.24 {Utf32ToUtfProc} -body {
+ encoding convertfrom utf-32 "\xFF\xFF\xFF\xFF"
+} -result \uFFFD
+test {encoding-16.25 strict} {Utf32ToUtfProc} -body {
+ encoding convertfrom -profile strict utf-32 "\x01\x00\x00\x01"
+} -returnCodes 1 -result {unexpected byte sequence starting at index 0: '\x01'}
+test {encoding-16.25 tcl8} {Utf32ToUtfProc} -body {
encoding convertfrom -profile tcl8 utf-32 "\x01\x00\x00\x01"
} -result \uFFFD
@@ -779,9 +779,12 @@ test encoding-24.3 {EscapeFreeProc on open channels} {stdio} {
list $count [viewable $line]
} [list 3 "乎乞也 (\\u4E4E\\u4E5E\\u4E5F)"]
-test encoding-24.4 {Parse valid or invalid utf-8} {
- string length [encoding convertfrom -profile tcl8 utf-8 "\xC0\x80"]
-} 1
+test {encoding-24.4 utf-8 invalid strict} {Parse invalid utf-8, strict} -body {
+ encoding convertfrom -profile strict utf-8 "\xC0\x80"
+} -returnCodes 1 -result {unexpected byte sequence starting at index 0: '\xC0'}
+test {encoding-24.4 utf-8 invalid tcl8} {UtfToUtfProc utf-8} {
+ encoding convertfrom -profile tcl8 utf-8 \xC0\x80
+} \x00
test encoding-24.5 {Parse valid or invalid utf-8} {
string length [encoding convertfrom -profile tcl8 utf-8 "\xC0\x81"]
} 2