diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2007-01-18 22:09:44 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2007-01-18 22:09:44 (GMT) |
commit | 13ed3eb3a5a92d5cd64bacdab777fe0745256556 (patch) | |
tree | a281aac38660e96650800f463a8db225fca41556 /tests/cmdAH.test | |
parent | e6f13c03f783b1f44e48a5cce6e0375aec26c292 (diff) | |
download | tcl-13ed3eb3a5a92d5cd64bacdab777fe0745256556.zip tcl-13ed3eb3a5a92d5cd64bacdab777fe0745256556.tar.gz tcl-13ed3eb3a5a92d5cd64bacdab777fe0745256556.tar.bz2 |
Small fixes to quell tests that fail on some kinds of Win systems
Diffstat (limited to 'tests/cmdAH.test')
-rw-r--r-- | tests/cmdAH.test | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/tests/cmdAH.test b/tests/cmdAH.test index 3f12dd2..031d152 100644 --- a/tests/cmdAH.test +++ b/tests/cmdAH.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: cmdAH.test,v 1.54 2006/10/01 13:03:56 patthoyts Exp $ +# RCS: @(#) $Id: cmdAH.test,v 1.55 2007/01/18 22:09:44 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -1161,16 +1161,13 @@ test cmdAH-24.4 {Tcl_FileObjCmd: mtime} { test cmdAH-24.5 {Tcl_FileObjCmd: mtime} { # Under Unix, use a file in /tmp to avoid clock skew due to NFS. # On other platforms, just use a file in the local directory. - if {[testConstraint unix]} { set name /tmp/tcl.test.[pid] } else { set name [file join [temporaryDirectory] tf] } - # Make sure that a new file's time is correct. 10 seconds variance # is allowed used due to slow networks or clock skew on a network drive. - file delete -force $name close [open $name w] set a [expr abs([clock seconds]-[file mtime $name])<10] @@ -1230,7 +1227,6 @@ test cmdAH-24.11 {Tcl_FileObjCmd: mtime touch with non-ascii chars} win { } 1 removeFile touch.me rename waitForEvenSecondForFAT {} - test cmdAH-24.12 {Tcl_FileObjCmd: mtime and daylight savings} { set name [file join [temporaryDirectory] clockchange] file delete -force $name @@ -1241,21 +1237,19 @@ test cmdAH-24.12 {Tcl_FileObjCmd: mtime and daylight savings} { file delete $name expr {$newmtime == $time ? 1 : "$newmtime != $time"} } {1} - # bug 1420432: setting mtime fails for directories on windows. -test cmdAH-24.13 {Tcl_FileObjCmd: directory mtime} { +test cmdAH-24.13 {Tcl_FileObjCmd: directory mtime} -setup { set dirname [file join [temporaryDirectory] tmp[pid]] file delete -force $dirname +} -constraints tempNotWin -body { file mkdir $dirname - set res [catch { - set old [file mtime $dirname] - file mtime $dirname 0 - set new [file mtime $dirname] - list $new [expr {$old != $new}] - } err] + set old [file mtime $dirname] + file mtime $dirname 0 + set new [file mtime $dirname] + list $new [expr {$old != $new}] +} -cleanup { file delete -force $dirname - list $res $err -} {0 {0 1}} +} -result {0 1} # owned |