diff options
author | patthoyts <patthoyts@users.sourceforge.net> | 2006-10-01 13:17:34 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@users.sourceforge.net> | 2006-10-01 13:17:34 (GMT) |
commit | 90cf19d1e8047062753c6dcb127807aec08760b7 (patch) | |
tree | b15ff467a4d2d1c525734eadd41b038813577977 /tests/cmdAH.test | |
parent | 6038a3e7e943a56a3a1d383b9048d2785d4171f3 (diff) | |
download | tcl-90cf19d1e8047062753c6dcb127807aec08760b7.zip tcl-90cf19d1e8047062753c6dcb127807aec08760b7.tar.gz tcl-90cf19d1e8047062753c6dcb127807aec08760b7.tar.bz2 |
Backported fix for bug #1420432 (cannot set mtime for directories on windows).
Diffstat (limited to 'tests/cmdAH.test')
-rw-r--r-- | tests/cmdAH.test | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/cmdAH.test b/tests/cmdAH.test index 6b0e053..646dd20 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.30.2.5 2005/11/15 16:41:41 kennykb Exp $ +# RCS: @(#) $Id: cmdAH.test,v 1.30.2.6 2006/10/01 13:17:34 patthoyts Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -1449,6 +1449,21 @@ test cmdAH-24.12 {Tcl_FileObjCmd: mtime and daylight savings} { expr {$newmtime == $time ? 1 : "$newmtime != $time"} } {1} +# bug 1420432: setting mtime fails for directories on windows. +test cmdAH-24.13 {Tcl_FileObjCmd: directory mtime} { + set dirname [file join [temporaryDirectory] tmp[pid]] + file delete -force $dirname + 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] + file delete -force $dirname + list $res $err +} {0 {0 1}} + # owned test cmdAH-25.1 {Tcl_FileObjCmd: owned} { |