summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2009-08-17 20:00:01 (GMT)
committerdgp <dgp@noemail.net>2009-08-17 20:00:01 (GMT)
commit777fabb0d7576c50002ae8236dbc324c3b7e6e91 (patch)
tree75a9f10c8e04da4ef8236a9a4d2f81bfbbd5bca7 /tests
parent82a7b7a4a40bc922f6bb2b806672f0bfb6450943 (diff)
downloadtcl-777fabb0d7576c50002ae8236dbc324c3b7e6e91.zip
tcl-777fabb0d7576c50002ae8236dbc324c3b7e6e91.tar.gz
tcl-777fabb0d7576c50002ae8236dbc324c3b7e6e91.tar.bz2
* generic/tclFileName.c: Correct result from [glob */test] when *
* tests/fileName.test: matches something like ~foo. [Bug 2837800] FossilOrigin-Name: 5433dba4a65943dd96b3a6585baa6bbb753a772c
Diffstat (limited to 'tests')
-rw-r--r--tests/fileName.test33
1 files changed, 32 insertions, 1 deletions
diff --git a/tests/fileName.test b/tests/fileName.test
index b197d2d..e482770 100644
--- a/tests/fileName.test
+++ b/tests/fileName.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: fileName.test,v 1.30.2.11 2009/03/27 19:14:36 dgp Exp $
+# RCS: @(#) $Id: fileName.test,v 1.30.2.12 2009/08/17 20:00:01 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -2064,6 +2064,37 @@ test fileName-20.4 {Bug 1750300} -setup {
removeDirectory foo
} -result 0
+test fileName-20.5 {Bug 2837800} -setup {
+ set dd [makeDirectory isolate]
+ set d [makeDirectory ./~foo $dd]
+ makeFile {} test $d
+ set savewd [pwd]
+ cd $dd
+} -body {
+ glob */test
+} -cleanup {
+ cd $savewd
+ removeFile test $d
+ removeDirectory ./~foo $dd
+ removeDirectory isolate
+} -result ~foo/test
+
+test fileName-20.6 {Bug 2837800} -setup {
+ # Recall that we have $env(HOME) set so that references
+ # to ~ point to [temporaryDirectory]
+ makeFile {} test ~
+ set dd [makeDirectory isolate]
+ set d [makeDirectory ./~ $dd]
+ set savewd [pwd]
+ cd $dd
+} -body {
+ glob -nocomplain */test
+} -cleanup {
+ cd $savewd
+ removeDirectory ./~ $dd
+ removeDirectory isolate
+ removeFile test ~
+} -result {}
# cleanup
catch {file delete -force C:/globTest}