summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2019-07-12 11:20:15 (GMT)
committersebres <sebres@users.sourceforge.net>2019-07-12 11:20:15 (GMT)
commit69d77fc137dfe0dae543983211539fccd42bf428 (patch)
tree88e4a07402b029d881a3a0faf63c50cbfb60498e /tests
parentb032f6d67b8090495120026fd1677d06bc353b4d (diff)
parent0ac369da08268513bd59ff640a4effd77027a012 (diff)
downloadtcl-69d77fc137dfe0dae543983211539fccd42bf428.zip
tcl-69d77fc137dfe0dae543983211539fccd42bf428.tar.gz
tcl-69d77fc137dfe0dae543983211539fccd42bf428.tar.bz2
integrate branch bug-4718b41c56, closes [4718b41c56]
Diffstat (limited to 'tests')
-rw-r--r--tests/cmdAH.test20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/cmdAH.test b/tests/cmdAH.test
index 516505c..e4205f1 100644
--- a/tests/cmdAH.test
+++ b/tests/cmdAH.test
@@ -18,6 +18,10 @@ if {[lsearch [namespace children] ::tcltest] == -1} {
testConstraint testchmod [llength [info commands testchmod]]
testConstraint testsetplatform [llength [info commands testsetplatform]]
testConstraint testvolumetype [llength [info commands testvolumetype]]
+testConstraint time64bit [expr {
+ $::tcl_platform(pointerSize) >= 8 ||
+ [llength [info command testsize]] && [testsize time_t] >= 8
+}]
testConstraint linkDirectory [expr {
![testConstraint win] ||
($::tcl_platform(osVersion) >= 5.0
@@ -1278,6 +1282,22 @@ test cmdAH-24.13 {Tcl_FileObjCmd: directory mtime} -setup {
file delete -force $dirname
} -result {0 1}
+# 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} {