diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-09-11 08:09:20 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-09-11 08:09:20 (GMT) |
commit | 0715d88019e40aa514b3b2d3ba691ab7d0a96eb2 (patch) | |
tree | ac95aabe297f6978466d57f62988df8f1abc0577 /library/tcltest | |
parent | 2592b1e93b713440a2fab51b01df4ad31bb21f7d (diff) | |
download | tcl-0715d88019e40aa514b3b2d3ba691ab7d0a96eb2.zip tcl-0715d88019e40aa514b3b2d3ba691ab7d0a96eb2.tar.gz tcl-0715d88019e40aa514b3b2d3ba691ab7d0a96eb2.tar.bz2 |
Use $index<0 in stead of $index==-1 consistantly
Diffstat (limited to 'library/tcltest')
-rw-r--r-- | library/tcltest/tcltest.tcl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl index c894ff1..2af79bc 100644 --- a/library/tcltest/tcltest.tcl +++ b/library/tcltest/tcltest.tcl @@ -640,7 +640,7 @@ namespace eval tcltest { proc IsVerbose {level} { variable Option - return [expr {[lsearch -exact $Option(-verbose) $level] != -1}] + return [expr {[lsearch -exact $Option(-verbose) $level] >= 0}] } # Default verbosity is to show bodies of failed tests @@ -3107,7 +3107,7 @@ proc tcltest::removeFile {name {directory ""}} { set fullName [file join $directory $name] DebugPuts 3 "[lindex [info level 0] 0]: removing $fullName" set idx [lsearch -exact $filesMade $fullName] - if {$idx == -1} { + if {$idx < 0} { DebugDo 1 { Warn "removeFile removing \"$fullName\":\n not created by makeFile" } @@ -3184,7 +3184,7 @@ proc tcltest::removeDirectory {name {directory ""}} { DebugPuts 3 "[lindex [info level 0] 0]: deleting $fullName" set idx [lsearch -exact $filesMade $fullName] set filesMade [lreplace $filesMade $idx $idx] - if {$idx == -1} { + if {$idx < 0} { DebugDo 1 { Warn "removeDirectory removing \"$fullName\":\n not created\ by makeDirectory" |