sl@0: # This file tests the filesystem and vfs internals. sl@0: # sl@0: # This file contains a collection of tests for one or more of the Tcl sl@0: # built-in commands. Sourcing this file into Tcl runs the tests and sl@0: # generates output for errors. No output means no errors were found. sl@0: # sl@0: # Copyright (c) 2002 Vincent Darley. sl@0: # sl@0: # See the file "license.terms" for information on usage and redistribution sl@0: # of this file, and for a DISCLAIMER OF ALL WARRANTIES. sl@0: sl@0: package require tcltest 2 sl@0: namespace eval ::tcl::test::fileSystem { sl@0: sl@0: catch { sl@0: namespace import ::tcltest::cleanupTests sl@0: namespace import ::tcltest::makeDirectory sl@0: namespace import ::tcltest::makeFile sl@0: namespace import ::tcltest::removeDirectory sl@0: namespace import ::tcltest::removeFile sl@0: namespace import ::tcltest::test sl@0: } sl@0: sl@0: catch { sl@0: file delete -force link.file sl@0: file delete -force dir.link sl@0: file delete -force [file join dir.file linkinside.file] sl@0: } sl@0: sl@0: cd [tcltest::temporaryDirectory] sl@0: makeFile "test file" gorp.file sl@0: makeDirectory dir.file sl@0: makeFile "test file in directory" [file join dir.file inside.file] sl@0: sl@0: if {[catch { sl@0: file link link.file gorp.file sl@0: file link \ sl@0: [file join dir.file linkinside.file] \ sl@0: [file join dir.file inside.file] sl@0: file link dir.link dir.file sl@0: }]} { sl@0: tcltest::testConstraint hasLinks 0 sl@0: } else { sl@0: tcltest::testConstraint hasLinks 1 sl@0: } sl@0: sl@0: tcltest::testConstraint testsimplefilesystem \ sl@0: [string equal testsimplefilesystem [info commands testsimplefilesystem]] sl@0: sl@0: test filesystem-1.0 {link normalisation} {hasLinks} { sl@0: string equal [file normalize gorp.file] [file normalize link.file] sl@0: } {0} sl@0: sl@0: test filesystem-1.1 {link normalisation} {hasLinks} { sl@0: string equal [file normalize dir.file] [file normalize dir.link] sl@0: } {0} sl@0: sl@0: test filesystem-1.2 {link normalisation} {hasLinks macOrUnix} { sl@0: string equal [file normalize [file join gorp.file foo]] \ sl@0: [file normalize [file join link.file foo]] sl@0: } {1} sl@0: sl@0: test filesystem-1.3 {link normalisation} {hasLinks} { sl@0: string equal [file normalize [file join dir.file foo]] \ sl@0: [file normalize [file join dir.link foo]] sl@0: } {1} sl@0: sl@0: test filesystem-1.4 {link normalisation} {hasLinks} { sl@0: string equal [file normalize [file join dir.file inside.file]] \ sl@0: [file normalize [file join dir.link inside.file]] sl@0: } {1} sl@0: sl@0: test filesystem-1.5 {link normalisation} {hasLinks} { sl@0: string equal [file normalize [file join dir.file linkinside.file]] \ sl@0: [file normalize [file join dir.file linkinside.file]] sl@0: } {1} sl@0: sl@0: test filesystem-1.6 {link normalisation} {hasLinks} { sl@0: string equal [file normalize [file join dir.file linkinside.file]] \ sl@0: [file normalize [file join dir.link inside.file]] sl@0: } {0} sl@0: sl@0: test filesystem-1.7 {link normalisation} {hasLinks macOrUnix} { sl@0: string equal [file normalize [file join dir.link linkinside.file foo]] \ sl@0: [file normalize [file join dir.file inside.file foo]] sl@0: } {1} sl@0: sl@0: test filesystem-1.8 {link normalisation} {hasLinks} { sl@0: string equal [file normalize [file join dir.file linkinside.filefoo]] \ sl@0: [file normalize [file join dir.link inside.filefoo]] sl@0: } {0} sl@0: sl@0: test filesystem-1.9 {link normalisation} {macOrUnix hasLinks} { sl@0: file delete -force dir.link sl@0: file link dir.link [file nativename dir.file] sl@0: string equal [file normalize [file join dir.file linkinside.file foo]] \ sl@0: [file normalize [file join dir.link inside.file foo]] sl@0: } {1} sl@0: sl@0: test filesystem-1.10 {link normalisation: double link} {macOrUnix hasLinks} { sl@0: file link dir2.link dir.link sl@0: string equal [file normalize [file join dir.file linkinside.file foo]] \ sl@0: [file normalize [file join dir2.link inside.file foo]] sl@0: } {1} sl@0: sl@0: makeDirectory dir2.file sl@0: sl@0: test filesystem-1.11 {link normalisation: double link, back in tree} {macOrUnix hasLinks} { sl@0: file link [file join dir2.file dir2.link] dir2.link sl@0: string equal [file normalize [file join dir.file linkinside.file foo]] \ sl@0: [file normalize [file join dir2.file dir2.link inside.file foo]] sl@0: } {1} sl@0: sl@0: test filesystem-1.12 {file new native path} {} { sl@0: for {set i 0} {$i < 10} {incr i} { sl@0: foreach f [lsort [glob -nocomplain -type l *]] { sl@0: catch {file readlink $f} sl@0: } sl@0: } sl@0: # If we reach here we've succeeded. We used to crash above. sl@0: expr 1 sl@0: } {1} sl@0: sl@0: test filesystem-1.13 {file normalisation} {winOnly} { sl@0: # This used to be broken sl@0: file normalize C:/thislongnamedoesntexist sl@0: } {C:/thislongnamedoesntexist} sl@0: sl@0: test filesystem-1.14 {file normalisation} {winOnly} { sl@0: # This used to be broken sl@0: file normalize c:/ sl@0: } {C:/} sl@0: sl@0: file delete -force dir2.file sl@0: file delete -force dir2.link sl@0: file delete -force link.file dir.link sl@0: removeFile [file join dir.file inside.file] sl@0: removeDirectory dir.file sl@0: sl@0: test filesystem-2.0 {new native path} {unixOnly} { sl@0: foreach f [lsort [glob -nocomplain /usr/bin/c*]] { sl@0: catch {file readlink $f} sl@0: } sl@0: # If we reach here we've succeeded. We used to crash above. sl@0: expr 1 sl@0: } {1} sl@0: sl@0: if {[catch {package require tcltest 2}]} { sl@0: puts stderr "Skipping tests filesystem-{3,4}.*: tcltest 2 required." sl@0: } else { sl@0: namespace import ::tcltest::testConstraint sl@0: sl@0: # Is the Tcltest package loaded? sl@0: # - that is, the special C-coded testing commands in tclTest.c sl@0: # - tests use testing commands introduced in Tcltest 8.4 sl@0: testConstraint Tcltest [expr { sl@0: [llength [package provide Tcltest]] sl@0: && [package vsatisfies [package provide Tcltest] 8.4]}] sl@0: sl@0: # Make sure the testfilesystem hasn't been registered. sl@0: while {![catch {testfilesystem 0}]} {} sl@0: sl@0: test filesystem-3.0 {Tcl_FSRegister} Tcltest { sl@0: testfilesystem 1 sl@0: } {registered} sl@0: sl@0: test filesystem-3.1 {Tcl_FSUnregister} Tcltest { sl@0: testfilesystem 0 sl@0: } {unregistered} sl@0: sl@0: test filesystem-3.2 {Tcl_FSUnregister} Tcltest { sl@0: list [catch {testfilesystem 0} err] $err sl@0: } {1 failed} sl@0: sl@0: test filesystem-3.3 {Tcl_FSRegister} Tcltest { sl@0: testfilesystem 1 sl@0: testfilesystem 1 sl@0: testfilesystem 0 sl@0: testfilesystem 0 sl@0: } {unregistered} sl@0: sl@0: test filesystem-3.4 {Tcl_FSRegister} Tcltest { sl@0: testfilesystem 1 sl@0: file system bar sl@0: } {reporting} sl@0: sl@0: test filesystem-3.5 {Tcl_FSUnregister} Tcltest { sl@0: testfilesystem 0 sl@0: lindex [file system bar] 0 sl@0: } {native} sl@0: sl@0: test filesystem-4.0 {testfilesystem} { sl@0: -constraints Tcltest sl@0: -match glob sl@0: -body { sl@0: testfilesystem 1 sl@0: set filesystemReport {} sl@0: file exists foo sl@0: testfilesystem 0 sl@0: set filesystemReport sl@0: } sl@0: -result {* {access foo}} sl@0: } sl@0: sl@0: test filesystem-4.1 {testfilesystem} { sl@0: -constraints Tcltest sl@0: -match glob sl@0: -body { sl@0: testfilesystem 1 sl@0: set filesystemReport {} sl@0: catch {file stat foo bar} sl@0: testfilesystem 0 sl@0: set filesystemReport sl@0: } sl@0: -result {* {stat foo}} sl@0: } sl@0: sl@0: test filesystem-4.2 {testfilesystem} { sl@0: -constraints Tcltest sl@0: -match glob sl@0: -body { sl@0: testfilesystem 1 sl@0: set filesystemReport {} sl@0: catch {file lstat foo bar} sl@0: testfilesystem 0 sl@0: set filesystemReport sl@0: } sl@0: -result {* {lstat foo}} sl@0: } sl@0: sl@0: test filesystem-4.3 {testfilesystem} { sl@0: -constraints Tcltest sl@0: -match glob sl@0: -body { sl@0: testfilesystem 1 sl@0: set filesystemReport {} sl@0: catch {glob *} sl@0: testfilesystem 0 sl@0: set filesystemReport sl@0: } sl@0: -result {* {matchindirectory *}*} sl@0: } sl@0: sl@0: test filesystem-5.1 {cache and ~} { sl@0: -constraints Tcltest sl@0: -match regexp sl@0: -body { sl@0: set orig $env(HOME) sl@0: set ::env(HOME) /foo/bar/blah sl@0: set testdir ~ sl@0: set res1 "Parent of ~ (/foo/bar/blah) is [file dirname $testdir]" sl@0: set ::env(HOME) /a/b/c sl@0: set res2 "Parent of ~ (/a/b/c) is [file dirname $testdir]" sl@0: set ::env(HOME) $orig sl@0: list $res1 $res2 sl@0: } sl@0: -result {{Parent of ~ \(/foo/bar/blah\) is (/foo/bar|foo:bar)} {Parent of ~ \(/a/b/c\) is (/a/b|a:b)}} sl@0: } sl@0: sl@0: test filesystem-6.1 {empty file name} { sl@0: list [catch {open ""} msg] $msg sl@0: } {1 {couldn't open "": no such file or directory}} sl@0: sl@0: test filesystem-6.2 {empty file name} { sl@0: list [catch {file stat "" arr} msg] $msg sl@0: } {1 {could not read "": no such file or directory}} sl@0: sl@0: test filesystem-6.3 {empty file name} { sl@0: list [catch {file atime ""} msg] $msg sl@0: } {1 {could not read "": no such file or directory}} sl@0: sl@0: test filesystem-6.4 {empty file name} { sl@0: list [catch {file attributes ""} msg] $msg sl@0: } {1 {could not read "": no such file or directory}} sl@0: sl@0: test filesystem-6.5 {empty file name} { sl@0: list [catch {file copy "" ""} msg] $msg sl@0: } {1 {error copying "": no such file or directory}} sl@0: sl@0: test filesystem-6.6 {empty file name} { sl@0: list [catch {file delete ""} msg] $msg sl@0: } {0 {}} sl@0: sl@0: test filesystem-6.7 {empty file name} { sl@0: list [catch {file dirname ""} msg] $msg sl@0: } {0 .} sl@0: sl@0: test filesystem-6.8 {empty file name} { sl@0: list [catch {file executable ""} msg] $msg sl@0: } {0 0} sl@0: sl@0: test filesystem-6.9 {empty file name} { sl@0: list [catch {file exists ""} msg] $msg sl@0: } {0 0} sl@0: sl@0: test filesystem-6.10 {empty file name} { sl@0: list [catch {file extension ""} msg] $msg sl@0: } {0 {}} sl@0: sl@0: test filesystem-6.11 {empty file name} { sl@0: list [catch {file isdirectory ""} msg] $msg sl@0: } {0 0} sl@0: sl@0: test filesystem-6.12 {empty file name} { sl@0: list [catch {file isfile ""} msg] $msg sl@0: } {0 0} sl@0: sl@0: test filesystem-6.13 {empty file name} { sl@0: list [catch {file join ""} msg] $msg sl@0: } {0 {}} sl@0: sl@0: test filesystem-6.14 {empty file name} { sl@0: list [catch {file link ""} msg] $msg sl@0: } {1 {could not read link "": no such file or directory}} sl@0: sl@0: test filesystem-6.15 {empty file name} { sl@0: list [catch {file lstat "" arr} msg] $msg sl@0: } {1 {could not read "": no such file or directory}} sl@0: sl@0: test filesystem-6.16 {empty file name} { sl@0: list [catch {file mtime ""} msg] $msg sl@0: } {1 {could not read "": no such file or directory}} sl@0: sl@0: test filesystem-6.17 {empty file name} { sl@0: list [catch {file mtime "" 0} msg] $msg sl@0: } {1 {could not read "": no such file or directory}} sl@0: sl@0: test filesystem-6.18 {empty file name} { sl@0: list [catch {file mkdir ""} msg] $msg sl@0: } {1 {can't create directory "": no such file or directory}} sl@0: sl@0: test filesystem-6.19 {empty file name} { sl@0: list [catch {file nativename ""} msg] $msg sl@0: } {0 {}} sl@0: sl@0: test filesystem-6.20 {empty file name} { sl@0: list [catch {file normalize ""} msg] $msg sl@0: } {0 {}} sl@0: sl@0: test filesystem-6.21 {empty file name} { sl@0: list [catch {file owned ""} msg] $msg sl@0: } {0 0} sl@0: sl@0: test filesystem-6.22 {empty file name} { sl@0: list [catch {file pathtype ""} msg] $msg sl@0: } {0 relative} sl@0: sl@0: test filesystem-6.23 {empty file name} { sl@0: list [catch {file readable ""} msg] $msg sl@0: } {0 0} sl@0: sl@0: test filesystem-6.24 {empty file name} { sl@0: list [catch {file readlink ""} msg] $msg sl@0: } {1 {could not readlink "": no such file or directory}} sl@0: sl@0: test filesystem-6.25 {empty file name} { sl@0: list [catch {file rename "" ""} msg] $msg sl@0: } {1 {error renaming "": no such file or directory}} sl@0: sl@0: test filesystem-6.26 {empty file name} { sl@0: list [catch {file rootname ""} msg] $msg sl@0: } {0 {}} sl@0: sl@0: test filesystem-6.27 {empty file name} { sl@0: list [catch {file separator ""} msg] $msg sl@0: } {1 {Unrecognised path}} sl@0: sl@0: test filesystem-6.28 {empty file name} { sl@0: list [catch {file size ""} msg] $msg sl@0: } {1 {could not read "": no such file or directory}} sl@0: sl@0: test filesystem-6.29 {empty file name} { sl@0: list [catch {file split ""} msg] $msg sl@0: } {0 {}} sl@0: sl@0: test filesystem-6.30 {empty file name} { sl@0: list [catch {file system ""} msg] $msg sl@0: } {1 {Unrecognised path}} sl@0: sl@0: test filesystem-6.31 {empty file name} { sl@0: list [catch {file tail ""} msg] $msg sl@0: } {0 {}} sl@0: sl@0: test filesystem-6.32 {empty file name} { sl@0: list [catch {file type ""} msg] $msg sl@0: } {1 {could not read "": no such file or directory}} sl@0: sl@0: test filesystem-6.33 {empty file name} { sl@0: list [catch {file writable ""} msg] $msg sl@0: } {0 0} sl@0: sl@0: # Make sure the testfilesystem hasn't been registered. sl@0: while {![catch {testfilesystem 0}]} {} sl@0: } sl@0: sl@0: test filesystem-7.1 {load from vfs} {win testsimplefilesystem} { sl@0: # This may cause a crash on exit sl@0: set dir [pwd] sl@0: cd [file dirname [info nameof]] sl@0: set dde [lindex [glob *dde*[info sharedlib]] 0] sl@0: testsimplefilesystem 1 sl@0: # This loads dde via a complex copy-to-temp operation sl@0: load simplefs:/$dde dde sl@0: testsimplefilesystem 0 sl@0: cd $dir sl@0: set res "ok" sl@0: # The real result of this test is what happens when Tcl exits. sl@0: } {ok} sl@0: sl@0: test filesystem-7.2 {cross-filesystem copy from vfs maintains mtime} \ sl@0: {testsimplefilesystem} { sl@0: set dir [pwd] sl@0: cd [tcltest::temporaryDirectory] sl@0: # We created this file several tests ago. sl@0: set origtime [file mtime gorp.file] sl@0: testsimplefilesystem 1 sl@0: file delete -force theCopy sl@0: file copy simplefs:/gorp.file theCopy sl@0: testsimplefilesystem 0 sl@0: set newtime [file mtime theCopy] sl@0: file delete theCopy sl@0: cd $dir sl@0: expr {$origtime == $newtime} sl@0: } {1} sl@0: sl@0: removeFile gorp.file sl@0: sl@0: test filesystem-8.1 {relative path objects and caching of pwd} { sl@0: set dir [pwd] sl@0: cd [tcltest::temporaryDirectory] sl@0: makeDirectory abc sl@0: makeDirectory def sl@0: makeFile "contents" [file join abc foo] sl@0: cd abc sl@0: set f "foo" sl@0: set res {} sl@0: lappend res [file exists $f] sl@0: lappend res [file exists $f] sl@0: cd .. sl@0: cd def sl@0: # If we haven't cleared the object's cwd cache, Tcl sl@0: # will think it still exists. sl@0: lappend res [file exists $f] sl@0: lappend res [file exists $f] sl@0: removeFile [file join abc foo] sl@0: removeDirectory abc sl@0: removeDirectory def sl@0: cd $dir sl@0: set res sl@0: } {1 1 0 0} sl@0: sl@0: test filesystem-8.2 {relative path objects and use of pwd} { sl@0: set origdir [pwd] sl@0: cd [tcltest::temporaryDirectory] sl@0: set dir "abc" sl@0: makeDirectory $dir sl@0: makeFile "contents" [file join abc foo] sl@0: cd $dir sl@0: set res [file exists [lindex [glob *] 0]] sl@0: cd .. sl@0: removeFile [file join abc foo] sl@0: removeDirectory abc sl@0: cd $origdir sl@0: set res sl@0: } {1} sl@0: sl@0: test filesystem-8.3 {path objects and empty string} { sl@0: set anchor "" sl@0: set dst foo sl@0: set res $dst sl@0: sl@0: set yyy [file split $anchor] sl@0: set dst [file join $anchor $dst] sl@0: lappend res $dst $yyy sl@0: } {foo foo {}} sl@0: sl@0: proc TestFind1 {d f} { sl@0: set r1 [file exists [file join $d $f]] sl@0: lappend res "[file join $d $f] found: $r1" sl@0: lappend res "is dir a dir? [file isdirectory $d]" sl@0: set r2 [file exists [file join $d $f]] sl@0: lappend res "[file join $d $f] found: $r2" sl@0: set res sl@0: } sl@0: proc TestFind2 {d f} { sl@0: set r1 [file exists [file join $d $f]] sl@0: lappend res "[file join $d $f] found: $r1" sl@0: lappend res "is dir a dir? [file isdirectory [file join $d]]" sl@0: set r2 [file exists [file join $d $f]] sl@0: lappend res "[file join $d $f] found: $r2" sl@0: set res sl@0: } sl@0: sl@0: test filesystem-9.1 {path objects and join and object rep} { sl@0: set origdir [pwd] sl@0: cd [tcltest::temporaryDirectory] sl@0: file mkdir [file join a b c] sl@0: set res [TestFind1 a [file join b . c]] sl@0: file delete -force a sl@0: cd $origdir sl@0: set res sl@0: } {{a/b/./c found: 1} {is dir a dir? 1} {a/b/./c found: 1}} sl@0: sl@0: test filesystem-9.2 {path objects and join and object rep} { sl@0: set origdir [pwd] sl@0: cd [tcltest::temporaryDirectory] sl@0: file mkdir [file join a b c] sl@0: set res [TestFind2 a [file join b . c]] sl@0: file delete -force a sl@0: cd $origdir sl@0: set res sl@0: } {{a/b/./c found: 1} {is dir a dir? 1} {a/b/./c found: 1}} sl@0: sl@0: test filesystem-9.2.1 {path objects and join and object rep} { sl@0: set origdir [pwd] sl@0: cd [tcltest::temporaryDirectory] sl@0: file mkdir [file join a b c] sl@0: set res [TestFind2 a [file join b .]] sl@0: file delete -force a sl@0: cd $origdir sl@0: set res sl@0: } {{a/b/. found: 1} {is dir a dir? 1} {a/b/. found: 1}} sl@0: sl@0: test filesystem-9.3 {path objects and join and object rep} { sl@0: set origdir [pwd] sl@0: cd [tcltest::temporaryDirectory] sl@0: file mkdir [file join a b c] sl@0: set res [TestFind1 a [file join b .. b c]] sl@0: file delete -force a sl@0: cd $origdir sl@0: set res sl@0: } {{a/b/../b/c found: 1} {is dir a dir? 1} {a/b/../b/c found: 1}} sl@0: sl@0: test filesystem-9.4 {path objects and join and object rep} { sl@0: set origdir [pwd] sl@0: cd [tcltest::temporaryDirectory] sl@0: file mkdir [file join a b c] sl@0: set res [TestFind2 a [file join b .. b c]] sl@0: file delete -force a sl@0: cd $origdir sl@0: set res sl@0: } {{a/b/../b/c found: 1} {is dir a dir? 1} {a/b/../b/c found: 1}} sl@0: sl@0: test filesystem-9.5 {path objects and file tail and object rep} { sl@0: set origdir [pwd] sl@0: cd [tcltest::temporaryDirectory] sl@0: file mkdir dgp sl@0: close [open dgp/test w] sl@0: foreach relative [glob -nocomplain [file join * test]] { sl@0: set absolute [file join [pwd] $relative] sl@0: set res [list [file tail $absolute] "test"] sl@0: } sl@0: file delete -force dgp sl@0: cd $origdir sl@0: set res sl@0: } {test test} sl@0: sl@0: test filesystem-9.6 {path objects and file join and object rep} {winOnly} { sl@0: set res {} sl@0: set p "C:\\toto" sl@0: lappend res [file join $p toto] sl@0: file isdirectory $p sl@0: lappend res [file join $p toto] sl@0: } {C:/toto/toto C:/toto/toto} sl@0: sl@0: test filesystem-9.7 {path objects and glob and file tail and tilde} { sl@0: set res {} sl@0: set origdir [pwd] sl@0: cd [tcltest::temporaryDirectory] sl@0: file mkdir tilde sl@0: close [open tilde/~testNotExist w] sl@0: cd tilde sl@0: set file [lindex [glob *test*] 0] sl@0: lappend res [file exists $file] [catch {file tail $file} r] $r sl@0: lappend res $file sl@0: lappend res [file exists $file] [catch {file tail $file} r] $r sl@0: lappend res [catch {file tail $file} r] $r sl@0: cd .. sl@0: file delete -force tilde sl@0: cd $origdir sl@0: set res sl@0: } {0 1 {user "testNotExist" doesn't exist} ~testNotExist 0 1 {user "testNotExist" doesn't exist} 1 {user "testNotExist" doesn't exist}} sl@0: test filesystem-9.8 {path objects and glob and file tail and tilde} { sl@0: set res {} sl@0: set origdir [pwd] sl@0: cd [tcltest::temporaryDirectory] sl@0: file mkdir tilde sl@0: close [open tilde/~testNotExist w] sl@0: cd tilde sl@0: set file1 [lindex [glob *test*] 0] sl@0: set file2 "~testNotExist" sl@0: lappend res $file1 $file2 sl@0: lappend res [catch {file tail $file1} r] $r sl@0: lappend res [catch {file tail $file2} r] $r sl@0: cd .. sl@0: file delete -force tilde sl@0: cd $origdir sl@0: set res sl@0: } {~testNotExist ~testNotExist 1 {user "testNotExist" doesn't exist} 1 {user "testNotExist" doesn't exist}} sl@0: test filesystem-9.9 {path objects and glob and file tail and tilde} { sl@0: set res {} sl@0: set origdir [pwd] sl@0: cd [tcltest::temporaryDirectory] sl@0: file mkdir tilde sl@0: close [open tilde/~testNotExist w] sl@0: cd tilde sl@0: set file1 [lindex [glob *test*] 0] sl@0: set file2 "~testNotExist" sl@0: lappend res [catch {file exists $file1} r] $r sl@0: lappend res [catch {file exists $file2} r] $r sl@0: lappend res [string equal $file1 $file2] sl@0: cd .. sl@0: file delete -force tilde sl@0: cd $origdir sl@0: set res sl@0: } {0 0 0 0 1} sl@0: sl@0: cleanupTests sl@0: } sl@0: namespace delete ::tcl::test::fileSystem sl@0: return