diff options
author | Kevin B Kenny <kennykb@acm.org> | 2004-09-11 18:57:56 (GMT) |
---|---|---|
committer | Kevin B Kenny <kennykb@acm.org> | 2004-09-11 18:57:56 (GMT) |
commit | e1dec685e9bda26a664969e11607fabc328c582c (patch) | |
tree | 1d2452bcda99b379a6cff5ce3eb4924082bc5153 /tests/clock.test | |
parent | 80f7a77b4a8d0abf89b50cc8fc656420bde8fed0 (diff) | |
download | tcl-e1dec685e9bda26a664969e11607fabc328c582c.zip tcl-e1dec685e9bda26a664969e11607fabc328c582c.tar.gz tcl-e1dec685e9bda26a664969e11607fabc328c582c.tar.bz2 |
* generic/tclClock.c (TclMktimeObjCmd): Corrected a bad check
for error return from 'mktime'.
* generic/tclObj.c (Tcl_GetIntFromObj): Corrected a problem where
demoting a wide to an int failed on a big-endian machine.
[Bug 1026125].
* tests/clock.test (clock-43.1): Added regression test for
error return from 'mktime'.
Diffstat (limited to 'tests/clock.test')
-rw-r--r-- | tests/clock.test | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/tests/clock.test b/tests/clock.test index a83ebf0..47bd228 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.44 2004/09/10 17:50:15 kennykb Exp $ +# RCS: @(#) $Id: clock.test,v 1.45 2004/09/11 18:57:57 kennykb Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -35281,6 +35281,26 @@ 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} + # cleanup namespace delete ::testClock |