diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2014-07-11 10:43:15 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2014-07-11 10:43:15 (GMT) |
commit | abb3fd7af04401f4735829d4c491d35f1a24506f (patch) | |
tree | 2b96ee7a6c6e1406bbb4a80314bd90ec5c8b9c84 | |
parent | fe3773a12fba16561208c2fcfddaccf977bc8073 (diff) | |
parent | df203baa1f787de574237d71c3df4491edc0dae4 (diff) | |
download | tcl-abb3fd7af04401f4735829d4c491d35f1a24506f.zip tcl-abb3fd7af04401f4735829d4c491d35f1a24506f.tar.gz tcl-abb3fd7af04401f4735829d4c491d35f1a24506f.tar.bz2 |
Starting with Unicode 6.3, the mongolian vowel separator (U+180e) is no longer a whitespace, but for Tcl it still is.
Update documentation accordingly, and extend test-cases for Unicode 7 compliance.
-rw-r--r-- | doc/string.n | 5 | ||||
-rw-r--r-- | tests/utf.test | 30 |
2 files changed, 18 insertions, 17 deletions
diff --git a/doc/string.n b/doc/string.n index 163abdd..72a69ff 100644 --- a/doc/string.n +++ b/doc/string.n @@ -131,8 +131,9 @@ Any Unicode printing character, including space. .IP \fBpunct\fR 12 Any Unicode punctuation character. .IP \fBspace\fR 12 -Any Unicode whitespace character, zero width space (U+200b), -word joiner (U+2060) and zero width no-break space (U+feff) (=BOM). +Any Unicode whitespace character, mongolian vowel separator +(U+180e), zero width space (U+200b), word joiner (U+2060) or +zero width no-break space (U+feff) (=BOM). .IP \fBtrue\fR 12 Any of the forms allowed to \fBTcl_GetBoolean\fR where the value is true. diff --git a/tests/utf.test b/tests/utf.test index ebab967..2d62fa0 100644 --- a/tests/utf.test +++ b/tests/utf.test @@ -293,15 +293,15 @@ test utf-20.1 {TclUniCharNcmp} { } {} test utf-21.1 {TclUniCharIsAlnum} { - # this returns 1 with Unicode 6 compliance + # this returns 1 with Unicode 7 compliance string is alnum \u1040\u021f\u0220 } {1} test utf-21.2 {unicode alnum char in regc_locale.c} { - # this returns 1 with Unicode 6 compliance + # this returns 1 with Unicode 7 compliance list [regexp {^[[:alnum:]]+$} \u1040\u021f\u0220] [regexp {^\w+$} \u1040\u021f\u0220] } {1 1} test utf-21.3 {unicode print char in regc_locale.c} { - # this returns 1 with Unicode 6 compliance + # this returns 1 with Unicode 7 compliance regexp {^[[:print:]]+$} \ufbc1 } 1 test utf-21.4 {TclUniCharIsGraph} { @@ -334,11 +334,11 @@ test utf-21.10 {unicode print char in regc_locale.c} { } {0} test utf-21.11 {TclUniCharIsControl} { # [Bug 3464428] - string is control \u00ad + string is control \u0000\u001f\u00ad\u0605\u061c\u180e\u2066\ufeff } {1} test utf-21.12 {unicode control char in regc_locale.c} { # [Bug 3464428], [Bug a876646efe] - regexp {^[[:cntrl:]]*$} \u0000\u001f\u00ad + regexp {^[[:cntrl:]]*$} \u0000\u001f\u00ad\u0605\u061c\u180e\u2066\ufeff } {1} test utf-22.1 {TclUniCharIsWordChar} { @@ -349,30 +349,30 @@ test utf-22.2 {TclUniCharIsWordChar} { } 10 test utf-23.1 {TclUniCharIsAlpha} { - # this returns 1 with Unicode 6 compliance - string is alpha \u021f\u0220 + # this returns 1 with Unicode 7 compliance + string is alpha \u021f\u0220\u037f\u052f } {1} test utf-23.2 {unicode alpha char in regc_locale.c} { - # this returns 1 with Unicode 6 compliance - regexp {^[[:alpha:]]+$} \u021f\u0220 + # this returns 1 with Unicode 7 compliance + regexp {^[[:alpha:]]+$} \u021f\u0220\u037f\u052f } {1} test utf-24.1 {TclUniCharIsDigit} { - # this returns 1 with Unicode 6 compliance + # this returns 1 with Unicode 7 compliance string is digit \u1040\uabf0 } {1} test utf-24.2 {unicode digit char in regc_locale.c} { - # this returns 1 with Unicode 6 compliance + # this returns 1 with Unicode 7 compliance list [regexp {^[[:digit:]]+$} \u1040\uabf0] [regexp {^\d+$} \u1040\uabf0] } {1 1} test utf-24.3 {TclUniCharIsSpace} { - # this returns 1 with Unicode 6 compliance - string is space \u1680\u180e + # this returns 1 with Unicode 7/TIP 413 compliance + string is space \u0085\u1680\u180e\u200b\u202f\u2060 } {1} test utf-24.4 {unicode space char in regc_locale.c} { - # this returns 1 with Unicode 6 compliance - list [regexp {^[[:space:]]+$} \u1680\u180e] [regexp {^\s+$} \u1680\u180e] + # this returns 1 with Unicode 7/TIP 413 compliance + list [regexp {^[[:space:]]+$} \u0085\u1680\u180e\u200b\u202f\u2060] [regexp {^\s+$} \u0085\u1680\u180e\u200b\u202f\u2060] } {1 1} testConstraint teststringobj [llength [info commands teststringobj]] |