diff options
author | Kevin B Kenny <kennykb@acm.org> | 2009-01-03 04:26:49 (GMT) |
---|---|---|
committer | Kevin B Kenny <kennykb@acm.org> | 2009-01-03 04:26:49 (GMT) |
commit | 094f9a80a6b856e6e646826421ade2c562b5aa26 (patch) | |
tree | 0d0ff7202d691330cc3e5b269ab3edd73b5b5566 /tests/clock.test | |
parent | 7ef4c9067d6da796ce288343198eb0fa100f1e60 (diff) | |
download | tcl-094f9a80a6b856e6e646826421ade2c562b5aa26.zip tcl-094f9a80a6b856e6e646826421ade2c562b5aa26.tar.gz tcl-094f9a80a6b856e6e646826421ade2c562b5aa26.tar.bz2 |
* library/clock.tcl (tcl::clock::add): Fixed error message formatting
in the case where [clock add] is presented with a bad switch.
* tests/clock.test (clock-65.1) Added a test case for the above
problem [Bug 2481670].
Diffstat (limited to 'tests/clock.test')
-rw-r--r-- | tests/clock.test | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/clock.test b/tests/clock.test index b1fcfb6..500cacb 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.88 2008/12/11 14:01:59 nijtmans Exp $ +# RCS: @(#) $Id: clock.test,v 1.89 2009/01/03 04:26:49 kennykb Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -36679,6 +36679,14 @@ test clock-64.2 {:: in format string [Bug 2362156]} {*}{ -result 2001-02-03::04:05:06 } +test clock-65.1 {clock add, bad option [Bug 2481670]} {*}{ + -body { + clock add 0 1 year -foo bar + } + -returnCodes error + -result {bad switch "-foo":*} +} + # cleanup namespace delete ::testClock |