diff options
author | stanton <stanton@noemail.net> | 1999-05-06 22:50:01 (GMT) |
---|---|---|
committer | stanton <stanton@noemail.net> | 1999-05-06 22:50:01 (GMT) |
commit | 32fc1157582b9eff3cb65b5623e29fc0144e30cf (patch) | |
tree | 6a06b39323901b3b57e1ebfa8dd85c045ffef4d8 /tests/string.test | |
parent | a5c60e7f75d12da944cbc06fede0a972e8c6405d (diff) | |
download | tcl-32fc1157582b9eff3cb65b5623e29fc0144e30cf.zip tcl-32fc1157582b9eff3cb65b5623e29fc0144e30cf.tar.gz tcl-32fc1157582b9eff3cb65b5623e29fc0144e30cf.tar.bz2 |
* tests/string.test:
* generic/tclCmdMZ.c:
* doc/string.n: Fixed bug in string equal/compare code when using
-length option. Cleaned up docs a bit more.
FossilOrigin-Name: 1fc2aff60033d5bbbda4282769408c1aa42ad13a
Diffstat (limited to 'tests/string.test')
-rw-r--r-- | tests/string.test | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/string.test b/tests/string.test index cd396c2..71f83be 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.8 1999/05/06 18:46:43 stanton Exp $ +# RCS: @(#) $Id: string.test,v 1.9 1999/05/06 22:50:04 stanton Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { source [file join [pwd] [file dirname [info script]] defs.tcl] @@ -95,6 +95,12 @@ test string-2.20 {string compare -len unicode} { test string-2.21 {string compare -nocase with special index} { list [catch {string compare -nocase -length end-3 Abcde abxyz} msg] $msg } {1 {expected integer but got "end-3"}} +test string-2.22 {string equal with length, unequal strings} { + string compare -length 2 abc abde +} 0 +test string-2.22 {string equal with length, unequal strings} { + string compare -length 2 ab abde +} 0 # only need a few tests on equal, since it uses the same code as # string compare, but just modifies the return output @@ -119,6 +125,9 @@ test string-3.6 {string equal -nocase} { test string-3.7 {string equal -nocase} { string equal -nocase abcde abcde } 1 +test string-3.8 {string equal with length, unequal strings} { + string equal -length 2 abc abde +} 1 test string-4.1 {string first} { list [catch {string first a} msg] $msg |