summaryrefslogtreecommitdiffstats
path: root/tests/cmdAH.test
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)
commit45f8750b6cdcdf2f420648ff8e04a1fcb12f19d5 (patch)
tree60fa5566603c62e37f69bdb9762bc0506879e67c /tests/cmdAH.test
parent3fda4f0df6f0fdabe84372aee281ffb4ca7108e1 (diff)
parent0e364dd3151b7ead1200e77e0024c811c9d3ed52 (diff)
downloadtcl-45f8750b6cdcdf2f420648ff8e04a1fcb12f19d5.zip
tcl-45f8750b6cdcdf2f420648ff8e04a1fcb12f19d5.tar.gz
tcl-45f8750b6cdcdf2f420648ff8e04a1fcb12f19d5.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 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