summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2017-06-02 20:07:10 (GMT)
committersebres <sebres@users.sourceforge.net>2017-06-02 20:07:10 (GMT)
commit79e52ef5c3df599f4f561715fc611c1fc197abe8 (patch)
tree18655b7ef42385da0683f888181e3130129cac57
parent02bea474ea746d2298fac5d0db0fcf44f9170e29 (diff)
downloadtcl-79e52ef5c3df599f4f561715fc611c1fc197abe8.zip
tcl-79e52ef5c3df599f4f561715fc611c1fc197abe8.tar.gz
tcl-79e52ef5c3df599f4f561715fc611c1fc197abe8.tar.bz2
[win32] repair clock test-cases for windows, using system locale / TZ :localtime (broken after removal of registry-fix in [848d01b6ef])
-rw-r--r--tests/clock.test15
1 files changed, 12 insertions, 3 deletions
diff --git a/tests/clock.test b/tests/clock.test
index 5f9a3ec..483d072 100644
--- a/tests/clock.test
+++ b/tests/clock.test
@@ -18,11 +18,20 @@ if {[lsearch [namespace children] ::tcltest] == -1} {
}
if {[testConstraint win]} {
+ # for windows test cases using system locale / TZ :localtime
if {[catch {
- ::tcltest::loadTestedCommands
- package require registry
+ ::tcltest::loadTestedCommands
+ package require registry
+ }]} {
+ # try to load registry directly from root (uninstalled / development env):
+ if {[catch {
+ load [lindex \
+ [glob -tails -directory [file dirname [info nameofexecutable]] \
+ tclreg*[expr {[::tcl::pkgconfig get debug] ? {g} : {}}].dll] 0 \
+ ] registry
}]} {
- namespace eval ::tcl::clock {variable NoRegistry {}}
+ namespace eval ::tcl::clock {variable NoRegistry {}}
+ }
}
}