summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-04-21 09:49:19 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-04-21 09:49:19 (GMT)
commite6d30d023d0709ee78fbe25603c9ee44017b3b5c (patch)
tree7e16249fb6cd86a52a1f82d6094e8bbf09039746
parent206022e9799361a82f91780bace269e514fb27bf (diff)
downloadtcl-e6d30d023d0709ee78fbe25603c9ee44017b3b5c.zip
tcl-e6d30d023d0709ee78fbe25603c9ee44017b3b5c.tar.gz
tcl-e6d30d023d0709ee78fbe25603c9ee44017b3b5c.tar.bz2
More test cleanup
-rw-r--r--generic/tclUtf.c4
-rw-r--r--tests/utf.test24
2 files changed, 20 insertions, 8 deletions
diff --git a/generic/tclUtf.c b/generic/tclUtf.c
index c018472..d753321 100644
--- a/generic/tclUtf.c
+++ b/generic/tclUtf.c
@@ -563,7 +563,7 @@ Tcl_UtfToChar16(
*chPtr = byte;
return 1;
}
-
+
/*
*---------------------------------------------------------------------------
*
@@ -910,7 +910,7 @@ Tcl_UtfNext(
* determine for certain in all circumstances whether the character
* that begins with the returned pointer will or will not include
* the byte src[-1]. In the scenario, where src points to the end of
- * a buffer being filled, the returned pointer point to either the
+ * a buffer being filled, the returned pointer points to either the
* final complete character in the string or to the earliest byte
* that might start an incomplete character waiting for more bytes to
* complete.
diff --git a/tests/utf.test b/tests/utf.test
index a12cc73..d4f45e9 100644
--- a/tests/utf.test
+++ b/tests/utf.test
@@ -140,10 +140,10 @@ test utf-4.10 {Tcl_NumUtfChars: #u0000, calc len, overcomplete} {testnumutfchars
testnumutfchars [testbytestring "\x00"] end+1
} {2}
test utf-4.11 {Tcl_NumUtfChars: 3 bytes of 4-byte UTF-8 characater} {testnumutfchars testbytestring} {
- testnumutfchars [testbytestring \xf0\x9f\x92\xa9] end-1
+ testnumutfchars [testbytestring \xF0\x9F\x92\xA9] end-1
} {3}
test utf-4.12 {Tcl_NumUtfChars: #4-byte UTF-8 character} {testnumutfchars testbytestring tip389} {
- testnumutfchars [testbytestring \xf0\x9f\x92\xa9] end
+ testnumutfchars [testbytestring \xF0\x9F\x92\xA9] end
} {2}
test utf-5.1 {Tcl_UtfFindFirst} {testfindfirst testbytestring} {
@@ -246,7 +246,7 @@ test utf-6.30 {Tcl_UtfNext} testutfnext {
testutfnext \xF2
} 1
test utf-6.31 {Tcl_UtfNext} testutfnext {
- testutfnext \xF2A
+ testutfnext \xF2G
} 1
test utf-6.32 {Tcl_UtfNext} testutfnext {
testutfnext \xF2\xA0
@@ -369,7 +369,7 @@ test utf-6.71 {Tcl_UtfNext} testutfnext {
testutfnext \xF2\xA0\xA0\xE8
} 1
test utf-6.71 {Tcl_UtfNext} testutfnext {
- testutfnext \xF2\xA0\xA0\xF4
+ testutfnext \xF2\xA0\xA0\xF2
} 1
test utf-6.73 {Tcl_UtfNext} testutfnext {
testutfnext \xF2\xA0\xA0\xF8
@@ -434,6 +434,18 @@ test utf-6.90 {Tcl_UtfNext, validity check [493dccc2de]} testutfnext {
test utf-6.91 {Tcl_UtfNext, validity check [493dccc2de]} testutfnext {
testutfnext \xF4\x90\x80\x80
} 1
+test utf-6.92 {Tcl_UtfNext, pointing to 2th byte of 4-byte valid sequence} testutfnext {
+ testutfnext \xA0\xA0\xA0
+} 1
+test utf-6.92.1 {Tcl_UtfNext, pointing to 2th byte of 4-byte valid sequence} testutfnext {
+ testutfnext \xF2\xA0\xA0\xA0 1
+} 2
+test utf-6.93 {Tcl_UtfNext, pointing to 2th byte of 4-byte invalid sequence} testutfnext {
+ testutfnext \x80\x80\x80
+} 1
+test utf-6.93.1 {Tcl_UtfNext, pointing to 2th byte of 4-byte invalid sequence} testutfnext {
+ testutfnext \xF0\x80\x80\x80 1
+} 2
test utf-7.1 {Tcl_UtfPrev} testutfprev {
testutfprev {}
@@ -861,8 +873,8 @@ test utf-12.3 {Tcl_UtfToLower} {
string tolower \xC3GH
} \xE3gh
test utf-12.4 {Tcl_UtfToLower} {
- string tolower \u01E2AB
-} \u01E3ab
+ string tolower \u01E2GH
+} \u01E3gh
test utf-12.5 {Tcl_UtfToLower Georgian (new in Unicode 11)} {
string tolower \u10D0\u1C90
} \u10D0\u10D0