diff options
author | vincentdarley <vincentdarley> | 2003-12-17 09:55:11 (GMT) |
---|---|---|
committer | vincentdarley <vincentdarley> | 2003-12-17 09:55:11 (GMT) |
commit | 55f33bb6ae4422f56b3b765f9b04884287fb3376 (patch) | |
tree | f0b0d4db30a39cfa070e26716ca00228c455f387 /tests/fileSystem.test | |
parent | d8e0f63d57a4fe64f5d531d6906be615718944aa (diff) | |
download | tcl-55f33bb6ae4422f56b3b765f9b04884287fb3376.zip tcl-55f33bb6ae4422f56b3b765f9b04884287fb3376.tar.gz tcl-55f33bb6ae4422f56b3b765f9b04884287fb3376.tar.bz2 |
fix to fs norm bug 860402
Diffstat (limited to 'tests/fileSystem.test')
-rw-r--r-- | tests/fileSystem.test | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/fileSystem.test b/tests/fileSystem.test index 9301f7d..5063417 100644 --- a/tests/fileSystem.test +++ b/tests/fileSystem.test @@ -51,6 +51,11 @@ if {[catch { tcltest::testConstraint hasLinks 1 } +tcltest::testConstraint testsetplatform [string equal testsetplatform [info commands testsetplatform]] +if {[tcltest::testConstraint testsetplatform]} { + set platform [testgetplatform] +} + tcltest::testConstraint testsimplefilesystem \ [string equal testsimplefilesystem [info commands testsimplefilesystem]] @@ -258,6 +263,25 @@ test filesystem-1.30 {normalisation of nonexistent user} { list [catch {file normalize ~noonewiththisname} err] $err } {1 {user "noonewiththisname" doesn't exist}} +test filesystem-1.31 {link normalisation: link near filesystem root} {testsetplatform} { + testsetplatform unix + file normalize /foo/../bar +} {/bar} + +test filesystem-1.32 {link normalisation: link near filesystem root} {testsetplatform} { + testsetplatform unix + file normalize /../bar +} {/bar} + +test filesystem-1.33 {link normalisation: link near filesystem root} {testsetplatform} { + testsetplatform windows + file normalize C:/../bar +} {C:/bar} + +if {[tcltest::testConstraint testsetplatform]} { + testsetplatform $platform +} + test filesystem-2.0 {new native path} {unixOnly} { foreach f [lsort [glob -nocomplain /usr/bin/c*]] { catch {file readlink $f} |