summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2004-03-26 18:45:09 (GMT)
committervincentdarley <vincentdarley>2004-03-26 18:45:09 (GMT)
commitdbf0dda330688becb98f2c5eb2e87878f80487cf (patch)
tree8fabafd735a40f93836eeb0060ee8bce9a5cfedc /tests
parent658bfb282ce6fcba3cdf53d7448e7fa3e3fa05ac (diff)
downloadtcl-dbf0dda330688becb98f2c5eb2e87878f80487cf.zip
tcl-dbf0dda330688becb98f2c5eb2e87878f80487cf.tar.gz
tcl-dbf0dda330688becb98f2c5eb2e87878f80487cf.tar.bz2
fix to windows volume-relative path normalization
Diffstat (limited to 'tests')
-rw-r--r--tests/fileSystem.test28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/fileSystem.test b/tests/fileSystem.test
index 964f201..281d8c9 100644
--- a/tests/fileSystem.test
+++ b/tests/fileSystem.test
@@ -47,6 +47,24 @@ if {$::tcl_platform(platform) eq "windows"} {
# The variable 'drive' will be used below
}
+tcltest::testConstraint moreThanOneDrive 0
+set drives [list]
+if {$::tcl_platform(platform) eq "windows"} {
+ set dir [pwd]
+ foreach vol [file volumes] {
+ if {![catch {cd $vol}]} {
+ lappend drives $vol
+ }
+ }
+ if {[llength $drives] > 1} {
+ tcltest::testConstraint moreThanOneDrive 1
+ }
+ # The variable 'drives' will be used below
+ unset vol
+ cd $dir
+ unset dir
+}
+
proc testPathEqual {one two} {
if {[string equal $one $two]} {
return 1
@@ -358,6 +376,16 @@ test filesystem-1.37 {file normalisation with '/./'} {
set res
} {ok}
+test filesystem-1.38 {file normalisation with volume relative} \
+ {winOnly moreThanOneDrive} {
+ set path "[string range [lindex $drives 0] 0 1]foo"
+ set dir [pwd]
+ cd [lindex $drives 1]
+ set res [file norm $path]
+ cd $dir
+ set res
+} "[lindex $drives 0]foo"
+
test filesystem-2.0 {new native path} {unixOnly} {
foreach f [lsort [glob -nocomplain /usr/bin/c*]] {
catch {file readlink $f}