summaryrefslogtreecommitdiffstats
path: root/tests/fileName.test
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley@noemail.net>2001-08-30 08:53:13 (GMT)
committervincentdarley <vincentdarley@noemail.net>2001-08-30 08:53:13 (GMT)
commit0a869d9ec691af644dcea5c22ae9a6ef6b3600fb (patch)
treecf952115d99a903d3c817b01278505ed6aaff55d /tests/fileName.test
parentae04acdf71b78c227a384109d001ad75dd83d8f8 (diff)
downloadtcl-0a869d9ec691af644dcea5c22ae9a6ef6b3600fb.zip
tcl-0a869d9ec691af644dcea5c22ae9a6ef6b3600fb.tar.gz
tcl-0a869d9ec691af644dcea5c22ae9a6ef6b3600fb.tar.bz2
filesystem
FossilOrigin-Name: 63ee4e7a09d028fa707389d63a2bdc197a342ce1
Diffstat (limited to 'tests/fileName.test')
-rw-r--r--tests/fileName.test36
1 files changed, 35 insertions, 1 deletions
diff --git a/tests/fileName.test b/tests/fileName.test
index a1a0011..5545cb1 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.12 2001/08/23 17:37:08 vincentdarley Exp $
+# RCS: @(#) $Id: fileName.test,v 1.13 2001/08/30 08:53:15 vincentdarley Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -304,6 +304,26 @@ test filename-4.18 {Tcl_SplitPath: unix} {testsetplatform} {
testsetplatform unix
file split foo/bar~/baz
} {foo bar~ baz}
+test filename-4.19 {Tcl_SplitPath} {
+ set oldDir [pwd]
+ set res [catch {
+ file mkdir tildetmp
+ set nastydir [file join tildetmp ./~tilde]
+ file mkdir $nastydir
+ set norm [file normalize $nastydir]
+ cd tildetmp
+ cd ./~tilde
+ glob -nocomplain *
+ set idx [string first tildetmp $norm]
+ set norm [string range $norm $idx end]
+ # fix path away so all platforms are the same
+ regsub -all ":" $norm "/" norm
+ file delete -force $nastydir
+ set norm
+ } err]
+ cd $oldDir
+ list $res $err
+} {0 tildetmp/~tilde}
test filename-5.1 {Tcl_SplitPath: mac} {testsetplatform} {
testsetplatform mac
@@ -1367,6 +1387,20 @@ test filename-11.43 {Tcl_GlobCmd} {
test filename-11.44 {Tcl_GlobCmd} {
list [catch {glob -tails -path hello -directory hello *} msg] $msg
} {1 {"-directory" cannot be used with "-path"}}
+test filename-11.45 {Tcl_GlobCmd on root volume} {
+ set res1 ""
+ set res2 ""
+ catch {
+ set res1 [glob -dir [lindex [file volumes] 0] -tails *]
+ }
+ catch {
+ set tmpd [pwd]
+ cd [lindex [file volumes] 0]
+ set res2 [glob *]
+ cd $tmpd
+ }
+ expr {$res1 == $res2}
+} {1}
file rename $horribleglobname globTest
set globname globTest