summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2006-07-30 19:15:41 (GMT)
committerKevin B Kenny <kennykb@acm.org>2006-07-30 19:15:41 (GMT)
commit7286027bfe63e54eb30b77335cd0f2061003eda3 (patch)
tree2a252e1553be442e4cca07ad0b5b6eb3640053a5
parent89523cfd09df9126005a8a40871fc44b9da1e89c (diff)
downloadtcl-7286027bfe63e54eb30b77335cd0f2061003eda3.zip
tcl-7286027bfe63e54eb30b77335cd0f2061003eda3.tar.gz
tcl-7286027bfe63e54eb30b77335cd0f2061003eda3.tar.bz2
Fixed Bug 1494664
-rw-r--r--ChangeLog4
-rw-r--r--library/clock.tcl6
-rw-r--r--tests/clock.test20
3 files changed, 25 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index eafa5f2..05e03ef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,9 @@
2006-07-30 Kevin Kenny <kennykb@acm.org>
* library/clock.tcl: Corrected syntax errors in generated code for
- %EC, %Ey, and %W format groups [Bug 1505383].
+ %EC, %Ey, and %W format groups [Bug 1505383]. Corrected a bug
+ in cache management for format strings containing [glob]
+ metacharacters [Bug 1494664].
* tools/makeTestCases.tcl: Added code to make sure that %U and %V
format groups are included in the tests. (The code depends on
%U and %V formatting working correctly when 'makeTestCases.tcl'
diff --git a/library/clock.tcl b/library/clock.tcl
index 0ed1eef..4a10ad3 100644
--- a/library/clock.tcl
+++ b/library/clock.tcl
@@ -13,7 +13,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.tcl,v 1.31 2006/07/30 18:58:55 kennykb Exp $
+# RCS: @(#) $Id: clock.tcl,v 1.32 2006/07/30 19:15:41 kennykb Exp $
#
#----------------------------------------------------------------------
@@ -757,7 +757,7 @@ proc ::tcl::clock::format { args } {
proc ::tcl::clock::ParseClockFormatFormat {format locale} {
set procName [namespace current]::formatproc'$format'$locale
- if {[info procs $procName] != {}} {
+ if {[namespace which $procName] != {}} {
return $procName
}
@@ -1563,7 +1563,7 @@ proc ::tcl::clock::ParseClockScanFormat {formatString locale} {
# the existing recognizer if it has.
set procName [namespace current]::scanproc'$formatString'$locale
- if { [info procs $procName] != {} } {
+ if { [namespace which $procName] != {} } {
return $procName
}
diff --git a/tests/clock.test b/tests/clock.test
index cabac3f..5b549a4 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.64 2006/07/30 18:58:55 kennykb Exp $
+# RCS: @(#) $Id: clock.test,v 1.65 2006/07/30 19:15:42 kennykb Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -36023,6 +36023,24 @@ test clock-53.1 {%EC %Ey} {
clock format 0 -gmt true -locale en_US_roman -format %EC%Ey
} mcmlxx
+# Test that glob-special characters can be handled in [clock]
+
+test clock-54.1 {glob specials in [clock format]} \
+ -setup {
+ clock format 0 -gmt 1 -format %Y
+ } \
+ -body {
+ clock format 0 -gmt 1 -format {*[%Y%m%d]*}
+ } \
+ -result {*[19700101]*}
+test clock-54.2 {glob specials in [clock scan]} \
+ -setup {
+ clock scan 1970 -gmt 1 -format %Y
+ } \
+ -body {
+ clock scan {*[19700101]*} -format {*[%Y%m%d]*} -gmt 1
+ } \
+ -result 0
# cleanup