diff options
author | hobbs <hobbs> | 2000-02-08 10:06:22 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2000-02-08 10:06:22 (GMT) |
commit | 17c784c7258d38f394995d734c460d20da182218 (patch) | |
tree | e4a4fb9a369e03bd62a840b858e67e31688cfccf /library/tcltest | |
parent | 3c070293450ed778ee662d98784457839cafc43f (diff) | |
download | tcl-17c784c7258d38f394995d734c460d20da182218.zip tcl-17c784c7258d38f394995d734c460d20da182218.tar.gz tcl-17c784c7258d38f394995d734c460d20da182218.tar.bz2 |
* library/tcltest1.0/tcltest.tcl: correctly protected searchDirectory
list to allow dirnames with spaces
Diffstat (limited to 'library/tcltest')
-rw-r--r-- | library/tcltest/tcltest.tcl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl index 950f3f4..d16ee14 100644 --- a/library/tcltest/tcltest.tcl +++ b/library/tcltest/tcltest.tcl @@ -12,7 +12,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: tcltest.tcl,v 1.21 2000/01/27 23:44:07 jenn Exp $ +# RCS: @(#) $Id: tcltest.tcl,v 1.22 2000/02/08 10:06:22 hobbs Exp $ package provide tcltest 1.0 @@ -1567,10 +1567,10 @@ proc ::tcltest::test {name description script expectedAnswer args} { proc ::tcltest::getMatchingFiles {args} { set matchingFiles {} - if {[llength $args] > 0} { + if {[llength $args]} { set searchDirectory $args } else { - set searchDirectory $::tcltest::testsDirectory + set searchDirectory [list $::tcltest::testsDirectory] } # Find the matching files in the list of directories and then remove the # ones that match the skip pattern @@ -1580,7 +1580,7 @@ proc ::tcltest::getMatchingFiles {args} { set matchFileList [concat $matchFileList \ [glob -nocomplain [file join $directory $match]]] } - if {$::tcltest::skipFiles != {}} { + if {[string compare {} $::tcltest::skipFiles]} { set skipFileList {} foreach skip $::tcltest::skipFiles { set skipFileList [concat $skipFileList \ @@ -1593,12 +1593,12 @@ proc ::tcltest::getMatchingFiles {args} { (![string match l.*.test [file tail $file]])} { lappend matchingFiles $file } - } + } } else { set matchingFiles [concat $matchingFiles $matchFileList] } } - if {$matchingFiles == {}} { + if {[string equal $matchingFiles {}]} { ::tcltest::PrintError "No test files remain after applying \ your match and skip patterns!" } |