summaryrefslogtreecommitdiffstats
path: root/tests/clock.test
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2008-11-30 19:24:00 (GMT)
committerKevin B Kenny <kennykb@acm.org>2008-11-30 19:24:00 (GMT)
commit1f9fea3af39eecdba2e1abbc05a09746c9a6d0c5 (patch)
tree60482ecd9fee645d9218ac4b32eab419842a8468 /tests/clock.test
parent99d7ee217cf3b720c3781056a7a423bd1170595c (diff)
downloadtcl-1f9fea3af39eecdba2e1abbc05a09746c9a6d0c5.zip
tcl-1f9fea3af39eecdba2e1abbc05a09746c9a6d0c5.tar.gz
tcl-1f9fea3af39eecdba2e1abbc05a09746c9a6d0c5.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 a2c0fda..6f2afdd 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.86 2008/07/21 21:25:22 nijtmans Exp $
+# RCS: @(#) $Id: clock.test,v 1.87 2008/11/30 19:24:00 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