summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--generic/tclEvent.c20
-rw-r--r--tests/clock.test38
3 files changed, 26 insertions, 41 deletions
diff --git a/ChangeLog b/ChangeLog
index b95a8ae..c03c6a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2004-08-17 Kevin Kenny <kennykb@acm.org>
+
+ * generic/tclEvent.c (Tcl_Finalize): Removed a copy-and-paste
+ accident that caused a (mostly harmless) double finalize of the
+ load and filesystem subsystems.
+ * tests/clock.test: Eliminated the bad test clock-43.1, and split
+ clock-50.1 into two tests, with a more permissive check on the
+ error message for an out-of-range value.
+
2004-08-12 Kevin Kenny <kennykb@acm.org>
* generic/tclClock.c (MktimeObjCmd):
diff --git a/generic/tclEvent.c b/generic/tclEvent.c
index 270e11b..cea3a15 100644
--- a/generic/tclEvent.c
+++ b/generic/tclEvent.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclEvent.c,v 1.63 2005/08/11 22:06:47 kennykb Exp $
+ * RCS: @(#) $Id: tclEvent.c,v 1.64 2005/08/17 21:27:41 kennykb Exp $
*/
#include "tclInt.h"
@@ -973,24 +973,6 @@ Tcl_Finalize()
TclResetFilesystem();
/*
- * We defer unloading of packages until very late to avoid memory
- * access issues. Both exit callbacks and synchronization variables
- * may be stored in packages.
- *
- * Note that TclFinalizeLoad unloads packages in the reverse of the
- * order they were loaded in (i.e. last to be loaded is the first to
- * be unloaded). This can be important for correct unloading when
- * dependencies exist.
- *
- * Once load has been finalized, we will have deleted any temporary
- * copies of shared libraries and can therefore reset the filesystem
- * to its original state.
- */
-
- TclFinalizeLoad();
- TclResetFilesystem();
-
- /*
* At this point, there should no longer be any ckalloc'ed memory.
*/
diff --git a/tests/clock.test b/tests/clock.test
index 3ad928e..4911726 100644
--- a/tests/clock.test
+++ b/tests/clock.test
@@ -11,7 +11,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.57 2005/08/12 23:55:28 kennykb Exp $
+# RCS: @(#) $Id: clock.test,v 1.58 2005/08/17 21:27:41 kennykb Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -35329,26 +35329,8 @@ test clock-42.1 {regression test - %z in :localtime when west of Greenwich } \
} \
-result {-0500}
-test clock-43.1 {regression test - mktime returning -1} \
- -setup {
- if { [info exists env(TZ)] } {
- set oldTZ $env(TZ)
- }
- set env(TZ) UTC0
- } \
- -body {
- clock scan 1969-12-31T23:59:59 -format %Y-%m-%dT%T -timezone :localtime
- } \
- -cleanup {
- if { [info exists oldTZ] } {
- set env(TZ) $oldTZ
- unset oldTZ
- } else {
- unset env(TZ)
- }
- } \
- -result {-1}
-
+# 43.1 was a bad test - mktime returning -1 is an error according to posix.
+
test clock-44.1 {regression test - time zone name containing hyphen } \
-setup {
if { [info exists env(TZ)] } {
@@ -35471,12 +35453,24 @@ test clock-50.1 {format / scan -1 as a local time} {
[clock format -1 -format %Y%m%d%H%M%S -timezone :localtime] \
-format %Y%m%d%H%M%S -timezone :localtime
} result]} {
- if { [regexp "clock value too" $result] } {
+ if { [regexp " too large" $result] } {
set result -1
}
}
set result
} -1
+test clock-50.2 {format / scan -2 as a local time} {
+ if {[catch {
+ clock scan \
+ [clock format -2 -format %Y%m%d%H%M%S -timezone :localtime] \
+ -format %Y%m%d%H%M%S -timezone :localtime
+ } result]} {
+ if { [regexp " too large" $result] } {
+ set result -2
+ }
+ }
+ set result
+} -2
# cleanup