diff options
author | dgp <dgp@users.sourceforge.net> | 2008-08-13 17:59:02 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2008-08-13 17:59:02 (GMT) |
commit | 172bede5d7aafd33f88fb8222158ec5ec03919b6 (patch) | |
tree | 1d81445c8930c478ad91f18c9ff88f8b3806019f /tests/fileName.test | |
parent | 8db6e6c1d648002473ed901f9d80f64a4c9c0d43 (diff) | |
download | tcl-172bede5d7aafd33f88fb8222158ec5ec03919b6.zip tcl-172bede5d7aafd33f88fb8222158ec5ec03919b6.tar.gz tcl-172bede5d7aafd33f88fb8222158ec5ec03919b6.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.test | 42 |
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] |