summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2006-07-30 17:05:42 (GMT)
committerKevin B Kenny <kennykb@acm.org>2006-07-30 17:05:42 (GMT)
commitce0022054c0176b268c48a6bc140cec484e6cc81 (patch)
tree5dbc8c242e7d6098025e0d20cb13635a64ab4367
parentfd93fde8a4d1ac5c52620f882601361b6d2e1d87 (diff)
downloadtcl-ce0022054c0176b268c48a6bc140cec484e6cc81.zip
tcl-ce0022054c0176b268c48a6bc140cec484e6cc81.tar.gz
tcl-ce0022054c0176b268c48a6bc140cec484e6cc81.tar.bz2
Bug 1513489
-rw-r--r--ChangeLog7
-rw-r--r--tests/clock.test54
2 files changed, 37 insertions, 24 deletions
diff --git a/ChangeLog b/ChangeLog
index 0f13d84..5e138d1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-07-30 Kevin Kenny <kennykb@acm.org>
+
+ * tests/clock.test: Allowed UTC as a synonym for GMT in two
+ tests that indirectly invoke 'strftime' with the result of
+ 'gmtime' to fix a bogus test failure on FreeBSD systems.
+ [Bug 1513489].
+
2006-07-30 Joe English <jenglish@users.sourceforge.net>
* doc/AppInit.3: Fix typo [Bug 1496886]
diff --git a/tests/clock.test b/tests/clock.test
index 6599218..c526771 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.22.2.6 2004/09/08 18:32:20 kennykb Exp $
+# RCS: @(#) $Id: clock.test,v 1.22.2.7 2006/07/30 17:05:43 kennykb Exp $
set env(LC_TIME) POSIX
@@ -63,17 +63,20 @@ test clock-3.1 {clock format tests} {unixOnly} {
set clockval 657687766
clock format $clockval -format {%a %b %d %I:%M:%S %p %Y} -gmt true
} {Sun Nov 04 03:02:46 AM 1990}
-test clock-3.2 {clock format tests} {
- # TCL_USE_TIMEZONE_VAR
-
- catch {set oldtz $env(TZ)}
- set env(TZ) PST
- set x {}
- append x [clock format 863800000 -format %Z -gmt 1]
- append x [set env(TZ)]
- catch {unset env(TZ); set env(TZ) $oldtz}
- set x
-} {GMTPST}
+test clock-3.2 {clock format tests} \
+ -body {
+ # TCL_USE_TIMEZONE_VAR
+
+ catch {set oldtz $env(TZ)}
+ set env(TZ) PST
+ set x {}
+ append x [clock format 863800000 -format %Z -gmt 1]
+ append x [set env(TZ)]
+ catch {unset env(TZ); set env(TZ) $oldtz}
+ set x
+ } \
+ -match regexp \
+ -result {(?:GMT|UTC)PST}
test clock-3.3 {clock format tests} {
# tzset() under Borland doesn't seem to set up tzname[] for local
# timezone, which caused "clock format" to think that %Z was an invalid
@@ -82,18 +85,21 @@ test clock-3.3 {clock format tests} {
clock format 863800000 -format %Z
set x {}
} {}
-test clock-3.4 {clock format tests} {
- # tzset() under Borland doesn't seem to set up tzname[] for gmt timezone.
- # tzset() under MSVC has the following weird observed behavior:
- # First time we call "clock format [clock seconds] -format %Z -gmt 1"
- # we get "GMT", but on all subsequent calls we get the current time
- # zone string, even though env(TZ) is GMT and the variable _timezone
- # is 0.
-
- set x {}
- append x [clock format 863800000 -format %Z -gmt 1]
- append x [clock format 863800000 -format %Z -gmt 1]
-} {GMTGMT}
+test clock-3.4 {clock format tests} \
+ -body {
+ # tzset() under Borland doesn't seem to set up tzname[] for gmt
+ # timezone. tzset() under MSVC has the following weird observed
+ # behavior:
+ # First time we call "clock format [clock seconds] -format %Z -gmt 1"
+ # we get "GMT", but on all subsequent calls we get the current time
+ # zone string, even though env(TZ) is GMT and the variable _timezone
+ # is 0.
+ set x {}
+ append x [clock format 863800000 -format %Z -gmt 1]
+ append x [clock format 863800000 -format %Z -gmt 1]
+ } \
+ -match regexp \
+ -result {GMTGMT|UTCUTC}
test clock-3.5 {clock format tests} {
list [catch {clock format} msg] $msg
} {1 {wrong # args: should be "clock format clockval ?-format string? ?-gmt boolean?"}}