summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2003-03-06 23:24:10 (GMT)
committerdgp <dgp@users.sourceforge.net>2003-03-06 23:24:10 (GMT)
commited9e2f1ebf814de045b0118ecfcaedddadfab6d1 (patch)
tree608b626c83433e5bef5a067658dfb01b47983f0c /tests
parent55bb78dc4fdf14318cfcbbeb264b7ef0a3e0a57e (diff)
downloadtcl-ed9e2f1ebf814de045b0118ecfcaedddadfab6d1.zip
tcl-ed9e2f1ebf814de045b0118ecfcaedddadfab6d1.tar.gz
tcl-ed9e2f1ebf814de045b0118ecfcaedddadfab6d1.tar.bz2
* generic/TclUtf.c (Tcl_UniCharNcasecmp): Corrected failure to
* tests/utf.test (utf-25.*): properly compare Unicode strings of different case in a case insensitive manner. [Bug 699042]
Diffstat (limited to 'tests')
-rw-r--r--tests/utf.test38
1 files changed, 36 insertions, 2 deletions
diff --git a/tests/utf.test b/tests/utf.test
index 0ba2414..9929482 100644
--- a/tests/utf.test
+++ b/tests/utf.test
@@ -8,10 +8,10 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: utf.test,v 1.8 2001/05/28 04:31:14 hobbs Exp $
+# RCS: @(#) $Id: utf.test,v 1.8.14.1 2003/03/06 23:24:18 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
- package require tcltest
+ package require tcltest 2
namespace import -force ::tcltest::*
}
@@ -299,6 +299,40 @@ test utf-24.2 {unicode space char in regc_locale.c} {
list [regexp {^[[:space:]]+$} \u1680] [regexp {^\s+$} \u1680]
} {1 1}
+testConstraint teststringobj [llength [info commands teststringobj]]
+test utf-25.1 {Tcl_UniCharNcasecmp} teststringobj {
+ testobj freeallvars
+ teststringobj set 1 a
+ teststringobj set 2 b
+ teststringobj getunicode 1
+ teststringobj getunicode 2
+ string compare -nocase [teststringobj get 1] [teststringobj get 2]
+} -1
+test utf-25.2 {Tcl_UniCharNcasecmp} teststringobj {
+ testobj freeallvars
+ teststringobj set 1 b
+ teststringobj set 2 a
+ teststringobj getunicode 1
+ teststringobj getunicode 2
+ string compare -nocase [teststringobj get 1] [teststringobj get 2]
+} 1
+test utf-25.3 {Tcl_UniCharNcasecmp} teststringobj {
+ testobj freeallvars
+ teststringobj set 1 B
+ teststringobj set 2 a
+ teststringobj getunicode 1
+ teststringobj getunicode 2
+ string compare -nocase [teststringobj get 1] [teststringobj get 2]
+} 1
+test utf-25.4 {Tcl_UniCharNcasecmp} teststringobj {
+ testobj freeallvars
+ teststringobj set 1 aBcB
+ teststringobj set 2 abca
+ teststringobj getunicode 1
+ teststringobj getunicode 2
+ string compare -nocase [teststringobj get 1] [teststringobj get 2]
+} 1
+
# cleanup
::tcltest::cleanupTests
return