summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2008-08-13 17:59:01 (GMT)
committerdgp <dgp@noemail.net>2008-08-13 17:59:01 (GMT)
commit95e5be08a92c12d025300bdf8e896636cc7961d7 (patch)
tree1d81445c8930c478ad91f18c9ff88f8b3806019f /tests
parentd1f1796ca325690bfd9b04eab533fb91ada2eb10 (diff)
downloadtcl-95e5be08a92c12d025300bdf8e896636cc7961d7.zip
tcl-95e5be08a92c12d025300bdf8e896636cc7961d7.tar.gz
tcl-95e5be08a92c12d025300bdf8e896636cc7961d7.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. FossilOrigin-Name: cc8e0dda9a9461f727ddbdd62d7813607c50b8d6
Diffstat (limited to 'tests')
-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]