summaryrefslogtreecommitdiffstats
path: root/tests/clock.test
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2008-11-30 19:25:45 (GMT)
committerKevin B Kenny <kennykb@acm.org>2008-11-30 19:25:45 (GMT)
commit336831b7a640936c4ab784e96c3c0116fe3b04aa (patch)
tree12fea22f154a2af56eb7b8ae0a62c91062558c0b /tests/clock.test
parent4f1e14923d50353097e8f629a8138d1acb8e64a1 (diff)
downloadtcl-336831b7a640936c4ab784e96c3c0116fe3b04aa.zip
tcl-336831b7a640936c4ab784e96c3c0116fe3b04aa.tar.gz
tcl-336831b7a640936c4ab784e96c3c0116fe3b04aa.tar.bz2
* library/clock.tcl (format, ParseClockScanFormat): Added a
[string map] to get rid of namespace delimiters before caching a scan or format procedure [Bug 2362156]. * tests/clock.test (clock-64.[12]): Added test cases for the bug that was tickled by a namespace delimiter inside a format string.
Diffstat (limited to 'tests/clock.test')
-rw-r--r--tests/clock.test15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/clock.test b/tests/clock.test
index cb7c4a1..cdb577f 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.83.2.2 2008/06/17 02:22:26 kennykb Exp $
+# RCS: @(#) $Id: clock.test,v 1.83.2.3 2008/11/30 19:25:46 kennykb Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -36644,6 +36644,19 @@ test clock-63.1 {Incorrect use of internal ConvertLocalToUTC command} {*}{
-result {key "localseconds" not found in dictionary}
}
+test clock-64.1 {:: in format string [Bug 2362156]} {*}{
+ -body {
+ clock scan 2001-02-03::04:05:06 -gmt 1 -format %Y-%m-%d::%H:%M:%S
+ }
+ -result 981173106
+}
+test clock-64.2 {:: in format string [Bug 2362156]} {*}{
+ -body {
+ clock format 981173106 -gmt 1 -format %Y-%m-%d::%H:%M:%S
+ }
+ -result 2001-02-03::04:05:06
+}
+
# cleanup
namespace delete ::testClock