diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2001-04-06 10:50:00 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2001-04-06 10:50:00 (GMT) |
commit | 8bccfa351c587aaf7e5d6aa27b0ef0141806c1cf (patch) | |
tree | 81860bb7f263e253fa649925296741b94c4e752b /tests | |
parent | 96bf5f215990235e4c0aa28930d25a4d16cdae32 (diff) | |
download | tcl-8bccfa351c587aaf7e5d6aa27b0ef0141806c1cf.zip tcl-8bccfa351c587aaf7e5d6aa27b0ef0141806c1cf.tar.gz tcl-8bccfa351c587aaf7e5d6aa27b0ef0141806c1cf.tar.bz2 |
Fixed problem with [string compare \x00 \x01] and hopefully sped the
command up in a few cases too (notably byte arrays and UNICODE
objects.) [Bug #219201]
Diffstat (limited to 'tests')
-rw-r--r-- | tests/string.test | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/string.test b/tests/string.test index d725cc4..aad463e 100644 --- a/tests/string.test +++ b/tests/string.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: string.test,v 1.27 2001/03/12 15:58:01 dkf Exp $ +# RCS: @(#) $Id: string.test,v 1.28 2001/04/06 10:50:00 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -119,12 +119,17 @@ test string-2.26 {string compare -nocase, null strings} { test string-2.27 {string compare -nocase, null strings} { string compare -nocase foo "" } 1 -test string-2.28 {string equal with length, unequal strings} { +test string-2.28 {string compare with length, unequal strings} { string compare -length 2 abc abde } 0 -test string-2.29 {string equal with length, unequal strings} { +test string-2.29 {string compare with length, unequal strings} { string compare -length 2 ab abde } 0 +test string-2.30 {string compare with NUL character vs. other ASCII} { + # Be careful here, since UTF-8 rep comparison with memcmp() of + # these puts chars in the wrong order + string compare \x00 \x01 +} -1 # only need a few tests on equal, since it uses the same code as # string compare, but just modifies the return output |