summaryrefslogtreecommitdiffstats
path: root/tests/clock.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/clock.test')
-rw-r--r--tests/clock.test27
1 files changed, 11 insertions, 16 deletions
diff --git a/tests/clock.test b/tests/clock.test
index 6674fe4..d6c44ab 100644
--- a/tests/clock.test
+++ b/tests/clock.test
@@ -11,30 +11,25 @@
# 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.60 2005/11/28 15:37:19 kennykb Exp $
+# RCS: @(#) $Id: clock.test,v 1.61 2006/03/21 11:12:28 dkf Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
namespace import -force ::tcltest::*
}
-if { $::tcl_platform(platform) eq {windows} } {
- if { [catch { package require registry 1.1 }] } {
-
+if {[testConstraint win]} {
+ if {[catch {package require registry 1.1}]} {
# HIDEOUS KLUDGE: [package require registry 1.1] has failed.
# This failure likely means that we're running in Tcl's build
# directory instead of the install directory. We recover by
# trying to load tclreg*.dll directly.
-
- if { [catch {
- load [lindex \
- [glob -directory \
- [file join \
- [pwd] \
- [file dirname [info nameofexecutable]]] \
- tclReg*.dll] \
- 0] registry
- }] } {
+
+ if {[catch {
+ load [lindex [glob -directory \
+ [file join [pwd] [file dirname [info nameofexecutable]]] \
+ tclReg*.dll] 0] registry
+ }]} then {
# Still no registry!
namespace eval ::tcl::clock [set NoRegistry {}]
}
@@ -42,9 +37,9 @@ if { $::tcl_platform(platform) eq {windows} } {
}
package require msgcat 1.4
-::tcltest::testConstraint detroit \
+testConstraint detroit \
[expr {![catch {clock format 0 -timezone :America/Detroit -format %z}]}]
-::tcltest::testConstraint y2038 \
+testConstraint y2038 \
[expr {[clock format 2158894800 -format %z -timezone :America/Detroit] eq {-0400}}]
# TEST PLAN