Tcl Source Code

Artifact [bc0ce8f5b4]
Login

Artifact bc0ce8f5b42eb339332eae4e1a00357f9253333c:

Attachment "1119798.patch" to ticket [1119798fff] added by dgp 2005-02-24 05:38:41.
Index: library/tcltest/pkgIndex.tcl
===================================================================
RCS file: /cvsroot/tcl/tcl/library/tcltest/pkgIndex.tcl,v
retrieving revision 1.19
diff -u -r1.19 pkgIndex.tcl
--- library/tcltest/pkgIndex.tcl	30 Oct 2004 02:16:52 -0000	1.19
+++ library/tcltest/pkgIndex.tcl	23 Feb 2005 22:36:53 -0000
@@ -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]]
Index: library/tcltest/tcltest.tcl
===================================================================
RCS file: /cvsroot/tcl/tcl/library/tcltest/tcltest.tcl,v
retrieving revision 1.93
diff -u -r1.93 tcltest.tcl
--- library/tcltest/tcltest.tcl	2 Nov 2004 19:03:29 -0000	1.93
+++ library/tcltest/tcltest.tcl	23 Feb 2005 22:36:54 -0000
@@ -24,7 +24,7 @@
     # 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 @@
 	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 @@
     # 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
 		}
 	    }
 	}
Index: tests/tcltest.test
===================================================================
RCS file: /cvsroot/tcl/tcl/tests/tcltest.test,v
retrieving revision 1.48
diff -u -r1.48 tcltest.test
--- tests/tcltest.test	25 Nov 2004 16:17:09 -0000	1.48
+++ tests/tcltest.test	23 Feb 2005 22:36:55 -0000
@@ -703,7 +703,7 @@
     set old [testsDirectory]
     testsDirectory [file dirname [info script]]
 } -body {
-    slave msg [file join [testsDirectory] all.tcl] -file a*.test
+    slave msg [file join [testsDirectory] all.tcl] -file as*.test
     set msg
 } -cleanup {
     testsDirectory $old
@@ -714,7 +714,7 @@
     testsDirectory [file dirname [info script]]
 } -body {
     slave msg [file join [testsDirectory] all.tcl] \
-	    -file a*.test -notfile assocd*
+	    -file as*.test -notfile assocd*
     regexp {assocd\.test} $msg
 } -cleanup {
     testsDirectory $old
@@ -746,6 +746,19 @@
     -result {foo bar}
 }
 
+test tcltest-9.5 {GetMatchingFiles: Bug 1119798} -setup {
+    file copy [file join [file dirname [info script]] all.tcl] [temporaryDirectory] 
+    makeDirectory foo
+    makeFile {} fee
+} -body {
+    slave msg [file join [temporaryDirectory] all.tcl] -file f*
+    regexp {exiting with errors:} $msg
+} -cleanup {
+    removeFile fee
+    removeDirectory foo
+    file delete [file join [temporaryDirectory] all.tcl]
+} -result 0
+
 # -preservecore, [preserveCore]
 set mc [makeFile {
     package require tcltest
Index: unix/Makefile.in
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/Makefile.in,v
retrieving revision 1.162
diff -u -r1.162 Makefile.in
--- unix/Makefile.in	11 Feb 2005 18:32:15 -0000	1.162
+++ unix/Makefile.in	23 Feb 2005 22:36:56 -0000
@@ -670,8 +670,8 @@
 	    done;
 	@echo "Installing package msgcat 1.4.1 as a Tcl Module";
 	@$(INSTALL_DATA) $(TOP_DIR)/library/msgcat/msgcat.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/msgcat-1.4.1.tm;
-	@echo "Installing package tcltest 2.2.7 as a Tcl Module";
-	@$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.3/tcltest-2.2.7.tm;
+	@echo "Installing package tcltest 2.2.8 as a Tcl Module";
+	@$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.3/tcltest-2.2.8.tm;
 	@echo "Installing library encoding directory";
 	@for i in $(TOP_DIR)/library/encoding/*.enc ; do \
 		$(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR)/encoding; \
Index: win/Makefile.in
===================================================================
RCS file: /cvsroot/tcl/tcl/win/Makefile.in,v
retrieving revision 1.87
diff -u -r1.87 Makefile.in
--- win/Makefile.in	6 Jan 2005 11:15:22 -0000	1.87
+++ win/Makefile.in	23 Feb 2005 22:36:56 -0000
@@ -569,8 +569,8 @@
 	    done;
 	@echo "Installing package msgcat 1.4.1 as a Tcl Module";
 	@$(COPY) $(ROOT_DIR)/library/msgcat/msgcat.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/msgcat-1.4.1.tm;
-	@echo "Installing package tcltest 2.2.7 as a Tcl Module";
-	@$(COPY) $(ROOT_DIR)/library/tcltest/tcltest.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.3/tcltest-2.2.7.tm;
+	@echo "Installing package tcltest 2.2.8 as a Tcl Module";
+	@$(COPY) $(ROOT_DIR)/library/tcltest/tcltest.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.3/tcltest-2.2.8.tm;
 	@echo "Installing encodings";
 	@for i in $(ROOT_DIR)/library/encoding/*.enc ; do \
 		$(COPY) "$$i" "$(SCRIPT_INSTALL_DIR)/encoding"; \