summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-06-06 09:25:14 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-06-06 09:25:14 (GMT)
commit0f81412091b7f145d6dd4c992533203fa831b1f3 (patch)
treeb6644dcd3a3c73e330cee3280f01d672aef82165 /tests
parent43f72f639e769da85db050f2e571b556502f32ab (diff)
parent8d78b23f96c0aa24978124d7fd0fbea7a86579e7 (diff)
downloadtcl-0f81412091b7f145d6dd4c992533203fa831b1f3.zip
tcl-0f81412091b7f145d6dd4c992533203fa831b1f3.tar.gz
tcl-0f81412091b7f145d6dd4c992533203fa831b1f3.tar.bz2
merge trunk
Diffstat (limited to 'tests')
-rw-r--r--tests/encoding.test25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/encoding.test b/tests/encoding.test
index d9ba072..49555b6 100644
--- a/tests/encoding.test
+++ b/tests/encoding.test
@@ -448,6 +448,31 @@ test encoding-24.3 {EscapeFreeProc on open channels} {stdio} {
list $count [viewable $line]
} [list 3 "\u4e4e\u4e5e\u4e5f (\\u4e4e\\u4e5e\\u4e5f)"]
+test encoding-24.4 {Parse valid or invalid utf-8} {
+ string length [encoding convertfrom utf-8 "\xc0\x80"]
+} 1
+test encoding-24.5 {Parse valid or invalid utf-8} {
+ string length [encoding convertfrom utf-8 "\xc0\x81"]
+} 2
+test encoding-24.6 {Parse valid or invalid utf-8} {
+ string length [encoding convertfrom utf-8 "\xc1\xbf"]
+} 2
+test encoding-24.7 {Parse valid or invalid utf-8} {
+ string length [encoding convertfrom utf-8 "\xc2\x80"]
+} 1
+test encoding-24.8 {Parse valid or invalid utf-8} {
+ string length [encoding convertfrom utf-8 "\xe0\x80\x80"]
+} 3
+test encoding-24.9 {Parse valid or invalid utf-8} {
+ string length [encoding convertfrom utf-8 "\xe0\x9f\xbf"]
+} 3
+test encoding-24.10 {Parse valid or invalid utf-8} {
+ string length [encoding convertfrom utf-8 "\xe0\xa0\x80"]
+} 1
+test encoding-24.11 {Parse valid or invalid utf-8} {
+ string length [encoding convertfrom utf-8 "\xef\xbf\xbf"]
+} 1
+
file delete [file join [temporaryDirectory] iso2022.txt]
#