diff options
author | hobbs <hobbs@noemail.net> | 2002-05-29 09:09:00 (GMT) |
---|---|---|
committer | hobbs <hobbs@noemail.net> | 2002-05-29 09:09:00 (GMT) |
commit | cd3588a459f89b616a115dccbf1ca498506c3fca (patch) | |
tree | 88864fae0ce82572aaca19bfe8d59618a1919120 /tests/stringComp.test | |
parent | 1a365f1142850b42f649522889e3e5bb21d01d5d (diff) | |
download | tcl-cd3588a459f89b616a115dccbf1ca498506c3fca.zip tcl-cd3588a459f89b616a115dccbf1ca498506c3fca.tar.gz tcl-cd3588a459f89b616a115dccbf1ca498506c3fca.tar.bz2 |
added more string comparison checks
FossilOrigin-Name: 0d46aa8304839f9bc0540e1b3fad61aa00b55a63
Diffstat (limited to 'tests/stringComp.test')
-rw-r--r-- | tests/stringComp.test | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/stringComp.test b/tests/stringComp.test index a867a19..20779e4 100644 --- a/tests/stringComp.test +++ b/tests/stringComp.test @@ -15,7 +15,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: stringComp.test,v 1.4 2001/11/14 23:16:36 hobbs Exp $ +# RCS: @(#) $Id: stringComp.test,v 1.5 2002/05/29 09:09:00 hobbs Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -172,6 +172,18 @@ test string-2.30 {string compare with NUL character vs. other ASCII} { proc foo {} {string compare \x00 \x01} foo } -1 +test string-2.31 {string compare, high bit} { + proc foo {} {string compare "a\x80" "a@"} + foo +} 1 +test string-2.32 {string compare, high bit} { + proc foo {} {string compare "a\x00" "a\x01"} + foo +} -1 +test string-2.33 {string compare, high bit} { + proc foo {} {string compare "\x00\x00" "\x00\x01"} + foo +} -1 # only need a few tests on equal, since it uses the same code as # string compare, but just modifies the return output |