summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-03-18 18:35:09 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-03-18 18:35:09 (GMT)
commit5c5c9a3e8402e5c96f8bb5d8384f712a22cb59ae (patch)
tree0ee28f72e7fd126692ccb9e660ede954324c37c3
parenta3cbfed957b0bb6f27adce4672cd01809ee22dbe (diff)
downloadtcl-5c5c9a3e8402e5c96f8bb5d8384f712a22cb59ae.zip
tcl-5c5c9a3e8402e5c96f8bb5d8384f712a22cb59ae.tar.gz
tcl-5c5c9a3e8402e5c96f8bb5d8384f712a22cb59ae.tar.bz2
Test independence in fileSystem.test
-rw-r--r--tests/fileSystem.test23
1 files changed, 18 insertions, 5 deletions
diff --git a/tests/fileSystem.test b/tests/fileSystem.test
index b3a9aca..ab3f62a 100644
--- a/tests/fileSystem.test
+++ b/tests/fileSystem.test
@@ -129,13 +129,18 @@ test filesystem-1.9 {link normalisation} {unix hasLinks} {
testPathEqual [file normalize [file join dir.dir linkinside.file foo]] \
[file normalize [file join dir.link inside.file foo]]
} {1}
-test filesystem-1.10 {link normalisation: double link} {unix hasLinks} {
+test filesystem-1.10 {link normalisation: double link} -constraints {
+ unix hasLinks
+} -body {
file link dir2.link dir.link
testPathEqual [file normalize [file join dir.dir linkinside.file foo]] \
[file normalize [file join dir2.link inside.file foo]]
-} {1}
+} -cleanup {
+ file delete dir2.link
+} -result {1}
makeDirectory dir2.file
test filesystem-1.11 {link normalisation: double link, back in tree} {unix hasLinks} {
+ file link dir2.link dir.link
file link [file join dir2.file dir2.link] [file join .. dir2.link]
testPathEqual [file normalize [file join dir.dir linkinside.file foo]] \
[file normalize [file join dir2.file dir2.link inside.file foo]]
@@ -504,16 +509,22 @@ test filesystem-2.0 {new native path} {unix} {
# Make sure the testfilesystem hasn't been registered.
if {[testConstraint testfilesystem]} {
+ proc resetfs {} {
while {![catch {testfilesystem 0}]} {}
+ }
}
test filesystem-3.0 {Tcl_FSRegister} testfilesystem {
+ resetfs
testfilesystem 1
} {registered}
test filesystem-3.1 {Tcl_FSUnregister} testfilesystem {
+ resetfs
+ testfilesystem 1
testfilesystem 0
} {unregistered}
test filesystem-3.2 {Tcl_FSUnregister} testfilesystem {
+ resetfs
list [catch {testfilesystem 0} err] $err
} {1 failed}
test filesystem-3.3 {Tcl_FSRegister} testfilesystem {
@@ -522,12 +533,14 @@ test filesystem-3.3 {Tcl_FSRegister} testfilesystem {
testfilesystem 0
testfilesystem 0
} {unregistered}
-test filesystem-3.4 {Tcl_FSRegister} testfilesystem {
+test filesystem-3.4 {Tcl_FSRegister} -constraints testfilesystem -body {
testfilesystem 1
file system bar
-} {reporting}
-test filesystem-3.5 {Tcl_FSUnregister} testfilesystem {
+} -cleanup {
testfilesystem 0
+} -result {reporting}
+test filesystem-3.5 {Tcl_FSUnregister} testfilesystem {
+ resetfs
lindex [file system bar] 0
} {native}