summaryrefslogtreecommitdiffstats
path: root/tests/clock.test
diff options
context:
space:
mode:
authorhobbs <hobbs>2002-05-29 09:08:43 (GMT)
committerhobbs <hobbs>2002-05-29 09:08:43 (GMT)
commit5fe462614952a2b96420e57e700d9fd11e4d6cdf (patch)
treef1e09a3765391db9abfeefefce51fcc913f201d4 /tests/clock.test
parentacc98cfd629f847b6e4b3e7eee967d7fe3f9bcdf (diff)
downloadtcl-5fe462614952a2b96420e57e700d9fd11e4d6cdf.zip
tcl-5fe462614952a2b96420e57e700d9fd11e4d6cdf.tar.gz
tcl-5fe462614952a2b96420e57e700d9fd11e4d6cdf.tar.bz2
better qualified 9.1 constraint check for %s
Diffstat (limited to 'tests/clock.test')
-rw-r--r--tests/clock.test11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/clock.test b/tests/clock.test
index ac93cb6..1c7cf57 100644
--- a/tests/clock.test
+++ b/tests/clock.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: clock.test,v 1.18 2002/05/29 00:19:39 hobbs Exp $
+# RCS: @(#) $Id: clock.test,v 1.19 2002/05/29 09:08:43 hobbs Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -427,10 +427,13 @@ test clock-8.1 {clock scan midnight/gmt range bug 413397} {
[clock format [clock scan year -base $5amPST -gmt 1] -format $fmt]
} {12/31 12/31}
-set ::tcltest::testConstraints(needPST) \
- [regexp {^(Pacific.*|P[DS]T)$} [clock format 1 -format %Z]]
+set ::tcltest::testConstraints(needPST) [expr {
+ [regexp {^(Pacific.*|P[DS]T)$} [clock format 1 -format %Z]]
+ && ([clock format 1 -format %s] != "%s")
+}]
test clock-9.1 {%s gmt testing} {needPST} {
- # We need PST to guarantee the difference value below.
+ # We need PST to guarantee the difference value below, and %s isn't
+ # valid on all OSes (like Solaris).
set s 100000
set a [clock format $s -format %s -gmt 0]
set b [clock format $s -format %s -gmt 1]