summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormdejong <mdejong>2001-09-09 17:32:15 (GMT)
committermdejong <mdejong>2001-09-09 17:32:15 (GMT)
commit24a8ccc2c6392872e42814dd4d1508be50ce76de (patch)
tree952b47e7256fb94f0fc30df1cec644e0480ee766
parent111a1a744eeb4323ff27b74ec68a659bea84e162 (diff)
downloadtcl-24a8ccc2c6392872e42814dd4d1508be50ce76de.zip
tcl-24a8ccc2c6392872e42814dd4d1508be50ce76de.tar.gz
tcl-24a8ccc2c6392872e42814dd4d1508be50ce76de.tar.bz2
* tests/cmdAH.test: Modify cmdAH-20.5 and cmdAH-24.8
to display the file atime or mtime results if the test fails.
-rw-r--r--ChangeLog6
-rw-r--r--tests/cmdAH.test8
2 files changed, 11 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 094e7c9..7f7a9bc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-09-09 Mo DeJong <mdejong@users.sourceforge.net>
+
+ * tests/cmdAH.test: Modify cmdAH-20.5 and cmdAH-24.8
+ to display the file atime or mtime results if
+ the test fails.
+
2001-09-08 David Gravereaux <davygrvy@pobox.com>
* win/mkd.bat:
diff --git a/tests/cmdAH.test b/tests/cmdAH.test
index 51bad09..88272d2 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.14 2001/07/31 19:12:07 vincentdarley Exp $
+# RCS: @(#) $Id: cmdAH.test,v 1.15 2001/09/09 17:32:16 mdejong Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -1193,7 +1193,8 @@ test cmdAH-20.5 {Tcl_FileObjCmd: atime touch} {
set atime [file atime $file]
after 1100; # pause a sec to notice change in atime
set newatime [clock seconds]
- expr {$newatime==[file atime $file $newatime]}
+ set modatime [file atime $file $newatime]
+ expr {$newatime == $modatime ? 1 : "$newatime != $modatime"}
} 1
# isdirectory
@@ -1332,7 +1333,8 @@ test cmdAH-24.8 {Tcl_FileObjCmd: mtime touch} {
set mtime [file mtime $file]
after 1100; # pause a sec to notice change in mtime
set newmtime [clock seconds]
- expr {$newmtime==[file mtime $file $newmtime]}
+ set modmtime [file mtime $file $newmtime]
+ expr {$newmtime == $modmtime ? 1 : "$newmtime != $modmtime"}
} 1