diff options
Diffstat (limited to 'tests/utf.test')
-rw-r--r-- | tests/utf.test | 54 |
1 files changed, 34 insertions, 20 deletions
diff --git a/tests/utf.test b/tests/utf.test index eb9952f..28d5643 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.2 1999/04/16 00:47:36 stanton Exp $ +# RCS: @(#) $Id: utf.test,v 1.3 1999/06/03 18:43:30 stanton Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { source [file join [pwd] [file dirname [info script]] defs.tcl] @@ -197,66 +197,79 @@ test utf-13.4 {Tcl_UtfToTitle} { string totitle \u01f3ab } \u01f2ab -test utf-14.1 {Tcl_UniCharToUpper, negative delta} { +test utf-14.1 {Tcl_UtfNcasecmp} { + string compare -nocase a b +} -1 +test utf-14.2 {Tcl_UtfNcasecmp} { + string compare -nocase b a +} 1 +test utf-14.3 {Tcl_UtfNcasecmp} { + string compare -nocase B a +} 1 +test utf-14.4 {Tcl_UtfNcasecmp} { + string compare -nocase aBcB abca +} 1 + +test utf-15.1 {Tcl_UniCharToUpper, negative delta} { string toupper aA } AA -test utf-14.2 {Tcl_UniCharToUpper, positive delta} { +test utf-15.2 {Tcl_UniCharToUpper, positive delta} { string toupper \u0178\u00ff } \u0178\u0178 -test utf-14.3 {Tcl_UniCharToUpper, no delta} { +test utf-15.3 {Tcl_UniCharToUpper, no delta} { string toupper ! } ! -test utf-15.1 {Tcl_UniCharToLower, negative delta} { +test utf-16.1 {Tcl_UniCharToLower, negative delta} { string tolower aA } aa -test utf-15.2 {Tcl_UniCharToLower, positive delta} { +test utf-16.2 {Tcl_UniCharToLower, positive delta} { string tolower \u0178\u00ff } \u00ff\u00ff -test utf-16.1 {Tcl_UniCharToLower, no delta} { +test utf-17.1 {Tcl_UniCharToLower, no delta} { string tolower ! } ! -test utf-17.1 {Tcl_UniCharToTitle, add one for title} { +test utf-18.1 {Tcl_UniCharToTitle, add one for title} { string totitle \u01c4 } \u01c5 -test utf-17.2 {Tcl_UniCharToTitle, subtract one for title} { +test utf-18.2 {Tcl_UniCharToTitle, subtract one for title} { string totitle \u01c6 } \u01c5 -test utf-17.3 {Tcl_UniCharToTitle, subtract delta for title (positive)} { +test utf-18.3 {Tcl_UniCharToTitle, subtract delta for title (positive)} { string totitle \u017f } \u0053 -test utf-17.4 {Tcl_UniCharToTitle, subtract delta for title (negative)} { +test utf-18.4 {Tcl_UniCharToTitle, subtract delta for title (negative)} { string totitle \u00ff } \u0178 -test utf-17.5 {Tcl_UniCharToTitle, no delta} { +test utf-18.5 {Tcl_UniCharToTitle, no delta} { string totitle ! } ! -test utf-18.1 {TclUniCharLen} { +test utf-19.1 {TclUniCharLen} { list [regexp \\d abc456def foo] $foo } {1 4} -test utf-19.1 {TclUniCharNcmp} { +test utf-20.1 {TclUniCharNcmp} { } {} -test utf-20.1 {TclUniCharIsAlnum} { +test utf-21.1 {TclUniCharIsAlnum} { } {} -test utf-21.1 {TclUniCharIsWordChar} { +test utf-22.1 {TclUniCharIsWordChar} { string wordend "xyz123_bar fg" 0 } 10 -test utf-21.1 {TclUniCharIsWordChar} { +test utf-22.2 {TclUniCharIsWordChar} { string wordend "x\u5080z123_bar\u203c fg" 0 } 10 -test utf-22.1 {TclUniCharIsAlpha} { +test utf-23.1 {TclUniCharIsAlpha} { } {} -test utf-23.1 {TclUniCharIsDigit} { +test utf-24.1 {TclUniCharIsDigit} { } {} -test utf-23.1 {TclUniCharIsSpace} { +test utf-24.2 {TclUniCharIsSpace} { } {} # cleanup @@ -274,3 +287,4 @@ return + |