diff options
author | Kevin B Kenny <kennykb@acm.org> | 2008-02-06 01:13:05 (GMT) |
---|---|---|
committer | Kevin B Kenny <kennykb@acm.org> | 2008-02-06 01:13:05 (GMT) |
commit | eac924b26e7181f5813720bf155fab400ab61ddd (patch) | |
tree | be5a6d0b626bcdb3317039a70e784f6f94952bed /tests | |
parent | bfae64345f6b96ef2ed77b4975b22edb8bf8688e (diff) | |
download | tcl-eac924b26e7181f5813720bf155fab400ab61ddd.zip tcl-eac924b26e7181f5813720bf155fab400ab61ddd.tar.gz tcl-eac924b26e7181f5813720bf155fab400ab61ddd.tar.bz2 |
* generic/tclClock.c (ClockParseformatargsObjCmd):
* library/clock.tcl (::tcl::clock::format):
* tests/clock.test (clock-1.0, clock-1.4):
Performance enhancements in [clock format] (moving
the analysis of $args into C code, holding on to
Tcl_Objs with resolved command names, [lassign]
in place of [foreach], avoiding [namespace which]
for command resolution).
Diffstat (limited to 'tests')
-rw-r--r-- | tests/clock.test | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/clock.test b/tests/clock.test index b736cac..257b5bd 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.81 2007/12/13 15:26:04 dgp Exp $ +# RCS: @(#) $Id: clock.test,v 1.82 2008/02/06 01:13:07 kennykb Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -272,9 +272,13 @@ test clock-1.3 "clock format - empty val" { clock format 0 -gmt 1 -format "" } {} -test clock-1.4 "clock format - bad flag" { +test clock-1.4 "clock format - bad flag" {*}{ + -body { list [catch {clock format 0 -oops badflag} msg] $msg $::errorCode -} {1 {bad switch "-oops", must be -format, -gmt, -locale or -timezone} {CLOCK badSwitch -oops}} + } + -match glob + -result {1 {bad switch "-oops": must be -format, -gmt, -locale, or -timezone} {CLOCK badSwitch -oops}} +} test clock-1.5 "clock format - bad timezone" { list [catch {clock format 0 -format "%s" -timezone :NOWHERE} msg] $msg $::errorCode |