summaryrefslogtreecommitdiffstats
path: root/tests/encoding.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-03-12 16:37:12 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-03-12 16:37:12 (GMT)
commit131176ce2f937173892c6e7e3a78978f6e8da2b5 (patch)
tree031956aad2c93499cbd812a5dc1c74d62c6c3a26 /tests/encoding.test
parent77e951f2b86cf0b20c2b38c753726d149a1c4ea9 (diff)
downloadtcl-131176ce2f937173892c6e7e3a78978f6e8da2b5.zip
tcl-131176ce2f937173892c6e7e3a78978f6e8da2b5.tar.gz
tcl-131176ce2f937173892c6e7e3a78978f6e8da2b5.tar.bz2
Backport [6fb14ee3e876978c]. Add testcases
Diffstat (limited to 'tests/encoding.test')
-rw-r--r--tests/encoding.test12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/encoding.test b/tests/encoding.test
index 0fe64ce..cf63211 100644
--- a/tests/encoding.test
+++ b/tests/encoding.test
@@ -568,6 +568,12 @@ test encoding-16.22 {Utf16ToUtfProc, strict, bug [db7a085bd9]} -body {
test encoding-16.23 {Utf16ToUtfProc, strict, bug [db7a085bd9]} -body {
encoding convertfrom -strict utf-16le \x00\xDC
} -returnCodes 1 -result {unexpected byte sequence starting at index 0: '\x00'}
+test encoding-16.24 {Utf32ToUtfProc} -body {
+ encoding convertfrom utf-32 "\xFF\xFF\xFF\xFF"
+} -result \uFFFD
+test encoding-16.25 {Utf32ToUtfProc} -body {
+ encoding convertfrom utf-32 "\x01\x00\x00\x01"
+} -result \uFFFD
test encoding-17.1 {UtfToUtf16Proc} -body {
encoding convertto utf-16 "\U460DC"
@@ -599,6 +605,12 @@ test encoding-17.9 {Utf32ToUtfProc} -body {
test encoding-17.10 {Utf32ToUtfProc} -body {
encoding convertfrom -nocomplain utf-32 "\xFF\xFF\xFF\xFF"
} -result \uFFFD
+test encoding-17.11 {Utf32ToUtfProc} -body {
+ encoding convertfrom -strict utf-32le "\x00\xD8\x00\x00"
+} -returnCodes error -result {unexpected byte sequence starting at index 0: '\x00'}
+test encoding-17.12 {Utf32ToUtfProc} -body {
+ encoding convertfrom -strict utf-32le "\x00\xDC\x00\x00"
+} -returnCodes error -result {unexpected byte sequence starting at index 0: '\x00'}
test encoding-18.1 {TableToUtfProc on invalid input} -constraints deprecated -body {
list [catch {encoding convertto jis0208 \\} res] $res