summaryrefslogtreecommitdiffstats
path: root/tests/fileName.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2008-08-13 18:12:55 (GMT)
committerdgp <dgp@users.sourceforge.net>2008-08-13 18:12:55 (GMT)
commitad7c4887d2add0d501c53584072742b67f9d63b5 (patch)
treeed726018a4af09887f994869575e0253fe2487a5 /tests/fileName.test
parentb2204a397c1dfc3a08953fd6a7d72ade2694c952 (diff)
downloadtcl-ad7c4887d2add0d501c53584072742b67f9d63b5.zip
tcl-ad7c4887d2add0d501c53584072742b67f9d63b5.tar.gz
tcl-ad7c4887d2add0d501c53584072742b67f9d63b5.tar.bz2
* generic/tclFileName.c: Fix for errors handling -types {}
* tests/fileName.test: option to [glob]. [Bug 1750300] Thanks to Matthias Kraft and George Peter Staplin.
Diffstat (limited to 'tests/fileName.test')
-rw-r--r--tests/fileName.test39
1 files changed, 38 insertions, 1 deletions
diff --git a/tests/fileName.test b/tests/fileName.test
index 4cd079b..e603c5a 100644
--- a/tests/fileName.test
+++ b/tests/fileName.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: fileName.test,v 1.51 2006/03/21 11:12:29 dkf Exp $
+# RCS: @(#) $Id: fileName.test,v 1.51.8.1 2008/08/13 18:12:56 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -1534,6 +1534,43 @@ test fileName-19.1 {ensure that [Bug 1325099] stays fixed} {
list [file exists ~//.nonexistant_file] [file exists ~///.nonexistant_file]
} {0 0}
+test fileName-20.1 {Bug 1750300} -setup {
+ set d [makeDirectory foo]
+ makeFile {} TAGS $d
+} -body {
+ llength [glob -nocomplain -directory $d -- TAGS tags Tags]
+} -cleanup {
+ removeFile TAGS $d
+ removeDirectory foo
+} -result 1
+test fileName-20.2 {Bug 1750300} -setup {
+ set d [makeDirectory foo]
+ makeFile {} TAGS $d
+} -body {
+ llength [glob -nocomplain -directory $d -types {} -- TAGS tags Tags]
+} -cleanup {
+ removeFile TAGS $d
+ removeDirectory foo
+} -result 1
+test fileName-20.3 {Bug 1750300} -setup {
+ set d [makeDirectory foo]
+ makeFile {} TAGS $d
+} -body {
+ llength [glob -nocomplain -directory $d -types {} -- *U*]
+} -cleanup {
+ removeFile TAGS $d
+ removeDirectory foo
+} -result 0
+test fileName-20.4 {Bug 1750300} -setup {
+ set d [makeDirectory foo]
+ makeFile {} TAGS $d
+} -body {
+ llength [glob -nocomplain -directory $d -types {} -- URGENT Urgent]
+} -cleanup {
+ removeFile TAGS $d
+ removeDirectory foo
+} -result 0
+
# cleanup
catch {file delete -force C:/globTest}
cd [temporaryDirectory]