summaryrefslogtreecommitdiffstats
path: root/tests/fileName.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2008-08-13 17:59:02 (GMT)
committerdgp <dgp@users.sourceforge.net>2008-08-13 17:59:02 (GMT)
commit7740c0fd63a6952846fab475fb23429ffbc85292 (patch)
tree1d81445c8930c478ad91f18c9ff88f8b3806019f /tests/fileName.test
parent8db6611c4c31932335de5a0c12de2a48830859b4 (diff)
downloadtcl-7740c0fd63a6952846fab475fb23429ffbc85292.zip
tcl-7740c0fd63a6952846fab475fb23429ffbc85292.tar.gz
tcl-7740c0fd63a6952846fab475fb23429ffbc85292.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.test42
1 files changed, 40 insertions, 2 deletions
diff --git a/tests/fileName.test b/tests/fileName.test
index 7635e2d..4573fbe 100644
--- a/tests/fileName.test
+++ b/tests/fileName.test
@@ -10,10 +10,10 @@
# 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.30.2.7 2005/06/21 19:07:58 kennykb Exp $
+# RCS: @(#) $Id: fileName.test,v 1.30.2.8 2008/08/13 17:59:08 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
- package require tcltest
+ package require tcltest 2
namespace import -force ::tcltest::*
}
@@ -2008,6 +2008,44 @@ test fileName-18.1 {windows - split ADS name correctly} {winOnly} {
list $x $y
} {{c:/ ./c:d} c:/c:d}
+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]