summaryrefslogtreecommitdiffstats
path: root/tests/utf.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2011-12-24 00:15:37 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2011-12-24 00:15:37 (GMT)
commitbd656d0e3881028b3b25a40e96d9253baabd44ec (patch)
tree80b45dd8b018a2a406128e2d65dd5ba6641eb428 /tests/utf.test
parent7cc01f77560c27ac24cdc87a1171c1c75853a7cf (diff)
parente1074be4bf98ca2d9b91651693f0da2ee6c1042d (diff)
downloadtcl-bd656d0e3881028b3b25a40e96d9253baabd44ec.zip
tcl-bd656d0e3881028b3b25a40e96d9253baabd44ec.tar.gz
tcl-bd656d0e3881028b3b25a40e96d9253baabd44ec.tar.bz2
[Bug 3464428] string is graph \u0120 is wrong
Diffstat (limited to 'tests/utf.test')
-rw-r--r--tests/utf.test17
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/utf.test b/tests/utf.test
index 60e3d52..273773b 100644
--- a/tests/utf.test
+++ b/tests/utf.test
@@ -27,9 +27,12 @@ test utf-1.3 {Tcl_UniCharToUtf: 2 byte sequences} {
test utf-1.4 {Tcl_UniCharToUtf: 3 byte sequences} {
set x "\u4e4e"
} [bytestring "\xe4\xb9\x8e"]
-test utf-1.5 {Tcl_UniCharToUtf: negative Tcl_UniChar} {
- string length [format %c -1]
-} 1
+test utf-1.5 {Tcl_UniCharToUtf: overflowed Tcl_UniChar} {
+ format %c 0x110000
+} [bytestring "\xef\xbf\xbd"]
+test utf-1.6 {Tcl_UniCharToUtf: negative Tcl_UniChar} {
+ format %c -1
+} [bytestring "\xef\xbf\xbd"]
test utf-2.1 {Tcl_UtfToUniChar: low ascii} {
string length "abc"
@@ -286,6 +289,14 @@ test utf-21.3 {unicode print char in regc_locale.c} {
# this returns 1 with Unicode 6 compliance
regexp {^[[:print:]]+$} \ufbc1
} 1
+test utf-21.4 {TclUniCharIsGraph} {
+ # [Bug 3464428]
+ string is graph \u0120
+} {1}
+test utf-21.5 {unicode graph char in regc_locale.c} {
+ # [Bug 3464428]
+ regexp {^[[:graph:]]+$} \u0120
+} {1}
test utf-22.1 {TclUniCharIsWordChar} {
string wordend "xyz123_bar fg" 0