summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2011-10-19 12:10:58 (GMT)
committerdgp <dgp@users.sourceforge.net>2011-10-19 12:10:58 (GMT)
commitdf806f842480e649fc047266bf38f41171482b28 (patch)
treee7ca4cd91015e7181aae2373a5fc63ef89f917a3 /tests
parenta9b46378b141ec445ac4351a36a2f7a38fcbc0b3 (diff)
parentab5335a4c951b478bbedd4f5561b8a314da5b074 (diff)
downloadtcl-remove_pathappend_intrep.zip
tcl-remove_pathappend_intrep.tar.gz
tcl-remove_pathappend_intrep.tar.bz2
Diffstat (limited to 'tests')
-rw-r--r--tests/clock.test33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/clock.test b/tests/clock.test
index 8c31f83..bda5e76 100644
--- a/tests/clock.test
+++ b/tests/clock.test
@@ -35895,6 +35895,39 @@ test clock-38.1 {regression - convertUTCToLocalViaC - east of Greenwich} \
} \
-result {01:00:00}
+test clock-38.2 {make sure TZ is not cached after unset} \
+ -setup {
+ if { [info exists env(TZ)] } {
+ set oldTZ $env(TZ)
+ unset env(TZ)
+ }
+ if { [info exists env(TCL_TZ)] } {
+ set oldTCLTZ $env(TCL_TZ)
+ unset env(TCL_TZ)
+ }
+ } \
+ -body {
+ set t1 [clock format 0]
+ # a time zone that is unlikely to anywhere
+ set env(TZ) "+04:20"
+ set t2 [clock format 0]
+ unset env(TZ)
+ set t3 [clock format 0]
+ expr {$t1 eq $t3 && $t1 ne $t2}
+ } \
+ -cleanup {
+ if { [info exists oldTZ] } {
+ set env(TZ) $oldTZ
+ unset oldTZ
+ }
+ if { [info exists oldTclTZ] } {
+ set env(TCL_TZ) $oldTclTZ
+ unset oldTclTZ
+ }
+ } \
+ -result 1
+
+
test clock-39.1 {regression - synonym timezones} {
clock format 0 -format {%H:%M:%S} -timezone :US/Eastern
} {19:00:00}