summaryrefslogtreecommitdiffstats
path: root/tests/cmdAH.test
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2013-03-18 14:25:54 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2013-03-18 14:25:54 (GMT)
commit04b2d343ffaa68adf23421fcc50499a2cee07205 (patch)
treed71bf5f90cdde558a50f6878c5793ab731077d38 /tests/cmdAH.test
parent57769fb109c41eb40a3c4883fa851b14c91c027b (diff)
parent480262ad9658c115b6864cae741558230f15a2bc (diff)
downloadtcl-04b2d343ffaa68adf23421fcc50499a2cee07205.zip
tcl-04b2d343ffaa68adf23421fcc50499a2cee07205.tar.gz
tcl-04b2d343ffaa68adf23421fcc50499a2cee07205.tar.bz2
[Bug 3608360]: Test to make sure we never let [file exists] do globbing.
Diffstat (limited to 'tests/cmdAH.test')
-rw-r--r--tests/cmdAH.test13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/cmdAH.test b/tests/cmdAH.test
index fb0fefc..dc61ac6 100644
--- a/tests/cmdAH.test
+++ b/tests/cmdAH.test
@@ -949,6 +949,19 @@ test cmdAH-19.11 {Tcl_FileObjCmd: exists} {unix notRoot} {
removeDirectory /tmp/tcl.foo.dir
set 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