summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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]