summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2013-03-18 14:30:32 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2013-03-18 14:30:32 (GMT)
commitf8b482aafe534fe811102424be714ce16171e386 (patch)
tree60fa5566603c62e37f69bdb9762bc0506879e67c
parent84d3dc55fca1e1991eb1360a9891ebd5f0a99c3f (diff)
parent04b2d343ffaa68adf23421fcc50499a2cee07205 (diff)
downloadtcl-f8b482aafe534fe811102424be714ce16171e386.zip
tcl-f8b482aafe534fe811102424be714ce16171e386.tar.gz
tcl-f8b482aafe534fe811102424be714ce16171e386.tar.bz2
[Bug 3608360]: Test to make sure we never let [file exists] do globbing.
-rw-r--r--ChangeLog7
-rw-r--r--tests/cmdAH.test13
2 files changed, 19 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index e25c8ca..2e3f842 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,12 @@
+2013-03-18 Donal K. Fellows <dkf@users.sf.net>
+
+ * tests/cmdAH.test (cmdAH-19.12): [Bug 3608360]: Added test to ensure
+ that we never ever allow [file exists] to do globbing.
+
2013-03-12 Jan Nijtmans <nijtmans@users.sf.net>
* unix/tcl.m4: Patch by Andrew Shadura, providing better support for
- * three architectures they have in Debian.
+ three architectures they have in Debian.
2013-03-11 Don Porter <dgp@users.sourceforge.net>
diff --git a/tests/cmdAH.test b/tests/cmdAH.test
index 3051bfb..39e9ece 100644
--- a/tests/cmdAH.test
+++ b/tests/cmdAH.test
@@ -954,6 +954,19 @@ test cmdAH-19.11 {Tcl_FileObjCmd: exists} -constraints {unix notRoot} -setup {
removeFile /tmp/tcl.foo.dir/file
removeDirectory /tmp/tcl.foo.dir
} -result 0
+test cmdAH-19.12 {Bug 3608360: [file exists] mustn't do globbing} -setup {
+ set newdirfile [makeDirectory newdir.file]
+ set cwd [pwd]
+ cd $newdirfile
+ # Content of file is totally unimportant; name is *not*
+ set innocentBystander [makeFile "abc" [file join $newdirfile foo.bar]]
+} -body {
+ list [file exists foo.bar] [file exists *.bar]
+} -cleanup {
+ cd $cwd
+ removeFile $innocentBystander
+ removeDirectory $newdirfile
+} -result {1 0}
# Stat related commands