summaryrefslogtreecommitdiffstats
path: root/tests/cmdAH.test
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2024-07-01 20:04:27 (GMT)
committersebres <sebres@users.sourceforge.net>2024-07-01 20:04:27 (GMT)
commitb3a4cff38fe89dffa98affcf23de984ed9e718fa (patch)
tree5766b700654039d19e8511885399c4e72025351c /tests/cmdAH.test
parent778f45c5349cd0bc32e3f3bc07d1811f56c7ba3f (diff)
downloadtcl-b3a4cff38fe89dffa98affcf23de984ed9e718fa.zip
tcl-b3a4cff38fe89dffa98affcf23de984ed9e718fa.tar.gz
tcl-b3a4cff38fe89dffa98affcf23de984ed9e718fa.tar.bz2
further attempt to fix [fd91b0ca09cb171f] (check whether some disk/driver may have 2038 problem)
Diffstat (limited to 'tests/cmdAH.test')
-rw-r--r--tests/cmdAH.test20
1 files changed, 18 insertions, 2 deletions
diff --git a/tests/cmdAH.test b/tests/cmdAH.test
index 5ab1ec7..2b5b0e9 100644
--- a/tests/cmdAH.test
+++ b/tests/cmdAH.test
@@ -25,6 +25,22 @@ testConstraint time64bit [expr {
([llength [info command testsize]] ?
[testsize st_mtime] : $::tcl_platform(pointerSize)) >= 8
}]
+testConstraint filetime64bit [expr {
+ [testConstraint time64bit] && (
+ ![testConstraint unix] || [apply {{} {
+ # check whether disk may have 2038 problem, see [fd91b0ca09cb171f]:
+ set fn [makeFile "" foo.text]
+ if {[catch {
+ exec sh -c "TZ=:UTC LC_TYME=en_US touch -ma -t '207006290000' '$fn' && TZ=:UTC LC_TYME=en_US ls -l '$fn'"
+ } res]} {
+ #puts "Check constraint failed:\t$res"
+ set res {}
+ }
+ removeFile $fn
+ regexp {\mJun\s+29\s+2070\M} $res
+ }}]
+ )
+}]
testConstraint linkDirectory [expr {
![testConstraint win] ||
($::tcl_platform(osVersion) >= 5.0
@@ -1296,14 +1312,14 @@ test cmdAH-24.14.1 {
} -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 {
+test cmdAH-24.20.1 {Tcl_FileObjCmd: atime 64-bit time_t, bug [4718b41c56]} -constraints {time64bit filetime64bit} -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 {
+test cmdAH-24.20.2 {Tcl_FileObjCmd: mtime 64-bit time_t, bug [4718b41c56]} -constraints {time64bit filetime64bit} -setup {
set filename [makeFile "" foo.text]
} -body {
list [file mtime $filename 3155760000] [file mtime $filename]