summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-02-17 19:15:28 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-02-17 19:15:28 (GMT)
commit0892c6f37c9e2638565bf7f8641fa137e46648c3 (patch)
tree173ba5830e297f93ab7211772d6a99763d164ccc /tests
parent6d674a96a1b99426cabf17e5b52272399c73e8bc (diff)
parentc731ca1ffdd3e7cc90cf064ac89b2f71551958ce (diff)
downloadtcl-0892c6f37c9e2638565bf7f8641fa137e46648c3.zip
tcl-0892c6f37c9e2638565bf7f8641fa137e46648c3.tar.gz
tcl-0892c6f37c9e2638565bf7f8641fa137e46648c3.tar.bz2
Merge 8.7
Diffstat (limited to 'tests')
-rw-r--r--tests/encoding.test8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/encoding.test b/tests/encoding.test
index a46fa5f..b0ecd6e 100644
--- a/tests/encoding.test
+++ b/tests/encoding.test
@@ -769,7 +769,7 @@ test encoding-24.14 {Parse valid or invalid utf-8} {
} 1
test encoding-24.15 {Parse valid or invalid utf-8} -body {
encoding convertfrom utf-8 "Z\xE0\x80"
-} -result Z\xE0\x80
+} -result Z\xE0\u20AC
test encoding-24.16 {Parse valid or invalid utf-8} -constraints testbytestring -body {
encoding convertto utf-8 [testbytestring "Z\u4343\x80"]
} -returnCodes 1 -result {expected byte sequence but character 1 was '䍃€' (U+004343)}
@@ -848,6 +848,12 @@ test encoding-24.40 {Try to generate invalid utf-8 with -nocomplain} -body {
test encoding-24.41 {Parse invalid utf-8 with -strict} -body {
encoding convertfrom -strict utf-8 \xED\xA0\x80\xED\xB0\x80
} -returnCodes 1 -result {unexpected byte sequence starting at index 0: '\xED'}
+test encoding-24.42 {Parse invalid utf-8, fallback to cp1252 [885c86a9a0]} -body {
+ encoding convertfrom -nocomplain utf-8 \xF0\x80\x80\x80
+} -result \xF0\u20AC\u20AC\u20AC
+test encoding-24.43 {Parse invalid utf-8, fallback to cp1252 [885c86a9a0]} -body {
+ encoding convertfrom -nocomplain utf-8 \x80
+} -result \u20AC
file delete [file join [temporaryDirectory] iso2022.txt]