summaryrefslogtreecommitdiffstats
path: root/tests/cmdAH.test
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2019-07-12 14:32:39 (GMT)
committersebres <sebres@users.sourceforge.net>2019-07-12 14:32:39 (GMT)
commit44952e7c43df343677cc3b6e2e455bda44b416f2 (patch)
tree030f0cef873ed56474caf8ca5affaa0e8a7aa12c /tests/cmdAH.test
parent15b8ba49c1063df0c200529a47089ca153c7088e (diff)
downloadtcl-44952e7c43df343677cc3b6e2e455bda44b416f2.zip
tcl-44952e7c43df343677cc3b6e2e455bda44b416f2.tar.gz
tcl-44952e7c43df343677cc3b6e2e455bda44b416f2.tar.bz2
restore test-cases covering bug-4718b41c56 (partially revert last checkin, cherrypick from 8.7), set constraint time64bit to 1 (always valid in 9.0)
Diffstat (limited to 'tests/cmdAH.test')
-rw-r--r--tests/cmdAH.test17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/cmdAH.test b/tests/cmdAH.test
index 54c4413..3d8f4f5 100644
--- a/tests/cmdAH.test
+++ b/tests/cmdAH.test
@@ -21,6 +21,7 @@ catch [list package require -exact Tcltest [info patchlevel]]
testConstraint testchmod [llength [info commands testchmod]]
testConstraint testsetplatform [llength [info commands testsetplatform]]
testConstraint testvolumetype [llength [info commands testvolumetype]]
+testConstraint time64bit 1
testConstraint linkDirectory [expr {
![testConstraint win] ||
($::tcl_platform(osVersion) >= 5.0
@@ -1288,6 +1289,22 @@ test cmdAH-24.14.1 {
file mtime [file join [temporaryDirectory] CON.txt]
} -match regexp -result {could not (?:get modification time|read)} -returnCodes error
+# 3155760000 is 64-bit unix time, Wed Jan 01 00:00:00 GMT 2070:
+test cmdAH-24.20.1 {Tcl_FileObjCmd: atime 64-bit time_t, bug [4718b41c56]} -constraints {time64bit} -setup {
+ set filename [makeFile "" foo.text]
+} -body {
+ list [file atime $filename 3155760000] [file atime $filename]
+} -cleanup {
+ removeFile $filename
+} -result {3155760000 3155760000}
+test cmdAH-24.20.2 {Tcl_FileObjCmd: mtime 64-bit time_t, bug [4718b41c56]} -constraints {time64bit} -setup {
+ set filename [makeFile "" foo.text]
+} -body {
+ list [file mtime $filename 3155760000] [file mtime $filename]
+} -cleanup {
+ file delete -force $filename
+} -result {3155760000 3155760000}
+
# owned
test cmdAH-25.1 {Tcl_FileObjCmd: owned} -returnCodes error -body {
file owned a b