diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2013-03-18 14:25:54 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2013-03-18 14:25:54 (GMT) |
commit | 0e364dd3151b7ead1200e77e0024c811c9d3ed52 (patch) | |
tree | d71bf5f90cdde558a50f6878c5793ab731077d38 | |
parent | 1e789a9a6ef92901cafbbb6800f3039cdfea9663 (diff) | |
parent | e2b19646a5d830ece42abf44cc6237b1f0a456d5 (diff) | |
download | tcl-0e364dd3151b7ead1200e77e0024c811c9d3ed52.zip tcl-0e364dd3151b7ead1200e77e0024c811c9d3ed52.tar.gz tcl-0e364dd3151b7ead1200e77e0024c811c9d3ed52.tar.bz2 |
[Bug 3608360]: Test to make sure we never let [file exists] do globbing.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | tests/cmdAH.test | 13 |
2 files changed, 19 insertions, 1 deletions
@@ -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-06 Don Porter <dgp@users.sourceforge.net> 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 |