summaryrefslogtreecommitdiffstats
path: root/tests/utf.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/utf.test')
-rw-r--r--tests/utf.test100
1 files changed, 67 insertions, 33 deletions
diff --git a/tests/utf.test b/tests/utf.test
index d5df773..575a5cd 100644
--- a/tests/utf.test
+++ b/tests/utf.test
@@ -8,7 +8,7 @@
# 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.13 2005/09/07 15:31:10 dgp Exp $
+# RCS: @(#) $Id: utf.test,v 1.14 2007/05/02 01:37:28 kennykb Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -319,39 +319,73 @@ test utf-24.4 {unicode space char in regc_locale.c} {
} {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
+
+test utf-25.1 {Tcl_UniCharNcasecmp} -constraints teststringobj \
+ -setup {
+ testobj freeallvars
+ } \
+ -body {
+ teststringobj set 1 a
+ teststringobj set 2 b
+ teststringobj getunicode 1
+ teststringobj getunicode 2
+ string compare -nocase [teststringobj get 1] [teststringobj get 2]
+ } \
+ -cleanup {
+ testobj freeallvars
+ } \
+ -result -1
+test utf-25.2 {Tcl_UniCharNcasecmp} -constraints teststringobj \
+ -setup {
+ testobj freeallvars
+ } \
+ -body {
+ teststringobj set 1 b
+ teststringobj set 2 a
+ teststringobj getunicode 1
+ teststringobj getunicode 2
+ string compare -nocase [teststringobj get 1] [teststringobj get 2]
+ } \
+ -cleanup {
+ testobj freeallvars
+ } \
+ -result 1
+test utf-25.3 {Tcl_UniCharNcasecmp} -constraints teststringobj \
+ -setup {
+ testobj freeallvars
+ } \
+ -body {
+ teststringobj set 1 B
+ teststringobj set 2 a
+ teststringobj getunicode 1
+ teststringobj getunicode 2
+ string compare -nocase [teststringobj get 1] [teststringobj get 2]
+ } \
+ -cleanup {
+ testobj freeallvars
+ } \
+ -result 1
+
+test utf-25.4 {Tcl_UniCharNcasecmp} -constraints teststringobj \
+ -setup {
+ testobj freeallvars
+ } \
+ -body {
+ teststringobj set 1 aBcB
+ teststringobj set 2 abca
+ teststringobj getunicode 1
+ teststringobj getunicode 2
+ string compare -nocase [teststringobj get 1] [teststringobj get 2]
+ } \
+ -cleanup {
+ testobj freeallvars
+ } \
+ -result 1
# cleanup
::tcltest::cleanupTests
return
+
+# Local Variables:
+# mode: tcl
+# End: