summaryrefslogtreecommitdiffstats
path: root/tests/cmdAH.test
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 /tests/cmdAH.test
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.
Diffstat (limited to 'tests/cmdAH.test')
-rw-r--r--tests/cmdAH.test8
1 files changed, 5 insertions, 3 deletions
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