diff options
author | dgp <dgp@users.sourceforge.net> | 2005-02-24 18:05:36 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2005-02-24 18:05:36 (GMT) |
commit | 4aab419f2a28b255fcf215888a9665ed97ec126c (patch) | |
tree | 4d26a0bfc2804342ef1118d9b32cf8f28989a8fd /library | |
parent | e496c271c1ad2c8e7d5020353ccbfcf5bd0c0bf2 (diff) | |
download | tcl-4aab419f2a28b255fcf215888a9665ed97ec126c.zip tcl-4aab419f2a28b255fcf215888a9665ed97ec126c.tar.gz tcl-4aab419f2a28b255fcf215888a9665ed97ec126c.tar.bz2 |
* library/tcltest/tcltest.tcl: Better use of [glob -types] to avoid
* tests/tcltest.test: failed attempts to [source] a directory, and
similar matters. Thanks to "mpettigr". [Bug 1119798]
* library/tcltest/pkgIndex.tcl: Bump to tcltest 2.2.8
* unix/Makefile.in:
* win/Makefile.in:
Diffstat (limited to 'library')
-rw-r--r-- | library/tcltest/pkgIndex.tcl | 2 | ||||
-rw-r--r-- | library/tcltest/tcltest.tcl | 31 |
2 files changed, 15 insertions, 18 deletions
diff --git a/library/tcltest/pkgIndex.tcl b/library/tcltest/pkgIndex.tcl index fe594b6..1aa4a46 100644 --- a/library/tcltest/pkgIndex.tcl +++ b/library/tcltest/pkgIndex.tcl @@ -9,4 +9,4 @@ # full path name of this file's directory. if {![package vsatisfies [package provide Tcl] 8.3]} {return} -package ifneeded tcltest 2.2.7 [list source [file join $dir tcltest.tcl]] +package ifneeded tcltest 2.2.8 [list source [file join $dir tcltest.tcl]] diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl index 5132f8e..0dd21f7 100644 --- a/library/tcltest/tcltest.tcl +++ b/library/tcltest/tcltest.tcl @@ -16,7 +16,7 @@ # Contributions from Don Porter, NIST, 2002. (not subject to US copyright) # All rights reserved. # -# RCS: @(#) $Id: tcltest.tcl,v 1.93 2004/11/02 19:03:29 dgp Exp $ +# RCS: @(#) $Id: tcltest.tcl,v 1.94 2005/02/24 18:05:42 dgp Exp $ package require Tcl 8.3 ;# uses [glob -directory] namespace eval tcltest { @@ -24,7 +24,7 @@ namespace eval tcltest { # When the version number changes, be sure to update the pkgIndex.tcl file, # and the install directory in the Makefiles. When the minor version # changes (new feature) be sure to update the man page as well. - variable Version 2.2.7 + variable Version 2.2.8 # Compatibility support for dumb variables defined in tcltest 1 # Do not use these. Call [package provide Tcl] and [info patchlevel] @@ -2569,14 +2569,16 @@ proc tcltest::GetMatchingFiles { args } { set matchFileList [list] foreach match [matchFiles] { set matchFileList [concat $matchFileList \ - [glob -directory $directory -nocomplain -- $match]] + [glob -directory $directory -types {b c f p s} \ + -nocomplain -- $match]] } # List files in $directory that match patterns to skip. set skipFileList [list] foreach skip [skipFiles] { set skipFileList [concat $skipFileList \ - [glob -directory $directory -nocomplain -- $skip]] + [glob -directory $directory -types {b c f p s} \ + -nocomplain -- $skip]] } # Add to result list all files in match list and not in skip list @@ -2618,25 +2620,20 @@ proc tcltest::GetMatchingDirectories {rootdir} { # comes up to avoid infinite loops. set skipDirs [list $rootdir] foreach pattern [skipDirectories] { - foreach path [glob -directory $rootdir -nocomplain -- $pattern] { - if {[file isdirectory $path]} { - lappend skipDirs $path - } - } + set skipDirs [concat $skipDirs [glob -directory $rootdir -types d \ + -nocomplain -- $pattern]] } # Now step through the matching directories, prune out the skipped ones # as you go. set matchDirs [list] foreach pattern [matchDirectories] { - foreach path [glob -directory $rootdir -nocomplain -- $pattern] { - if {[file isdirectory $path]} { - if {[lsearch -exact $skipDirs $path] == -1} { - set matchDirs [concat $matchDirs \ - [GetMatchingDirectories $path]] - if {[file exists [file join $path all.tcl]]} { - lappend matchDirs $path - } + foreach path [glob -directory $rootdir -types d -nocomplain -- \ + $pattern] { + if {[lsearch -exact $skipDirs $path] == -1} { + set matchDirs [concat $matchDirs [GetMatchingDirectories $path]] + if {[file exists [file join $path all.tcl]]} { + lappend matchDirs $path } } } |