diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2013-03-18 14:22:50 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2013-03-18 14:22:50 (GMT) |
commit | 480262ad9658c115b6864cae741558230f15a2bc (patch) | |
tree | c0df606f4147b4ca2dd7749233b38ea1227986bc /tests/cmdAH.test | |
parent | cbf47858482296139b6fe3f42969f14f94cbe05a (diff) | |
download | tcl-480262ad9658c115b6864cae741558230f15a2bc.zip tcl-480262ad9658c115b6864cae741558230f15a2bc.tar.gz tcl-480262ad9658c115b6864cae741558230f15a2bc.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.test | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/cmdAH.test b/tests/cmdAH.test index 28e396f..311d3c9 100644 --- a/tests/cmdAH.test +++ b/tests/cmdAH.test @@ -909,6 +909,19 @@ test cmdAH-19.11 {Tcl_FileObjCmd: exists} {unixOnly 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 |