diff options
author | vincentdarley <vincentdarley@noemail.net> | 2003-12-17 09:55:10 (GMT) |
---|---|---|
committer | vincentdarley <vincentdarley@noemail.net> | 2003-12-17 09:55:10 (GMT) |
commit | 09c20bd9dd0da8abc9a4ddcbc1d2e5cb07222f6f (patch) | |
tree | f0b0d4db30a39cfa070e26716ca00228c455f387 /tests/fileSystem.test | |
parent | 7aff6b182d64dd95f02d66f57f5c446b95b34678 (diff) | |
download | tcl-09c20bd9dd0da8abc9a4ddcbc1d2e5cb07222f6f.zip tcl-09c20bd9dd0da8abc9a4ddcbc1d2e5cb07222f6f.tar.gz tcl-09c20bd9dd0da8abc9a4ddcbc1d2e5cb07222f6f.tar.bz2 |
fix to fs norm bug 860402
FossilOrigin-Name: 487c53d709e90df7601d6568a286e52b5602e329
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} |