diff options
author | pooryorick <com.digitalsmarties@pooryorick.com> | 2023-06-27 10:07:19 (GMT) |
---|---|---|
committer | pooryorick <com.digitalsmarties@pooryorick.com> | 2023-06-27 10:07:19 (GMT) |
commit | 53cfe378b381c02747bc77cbc908d7dff4c328c3 (patch) | |
tree | fd7ce2e51942446f69d0158ccba158cdd34d5f3b /tests/encoding.test | |
parent | 7f18f499d0213379c1af47cc57c59b872b2e9533 (diff) | |
download | tcl-53cfe378b381c02747bc77cbc908d7dff4c328c3.zip tcl-53cfe378b381c02747bc77cbc908d7dff4c328c3.tar.gz tcl-53cfe378b381c02747bc77cbc908d7dff4c328c3.tar.bz2 |
Fix previous errors in encoding.test
Diffstat (limited to 'tests/encoding.test')
-rw-r--r-- | tests/encoding.test | 23 |
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 |