summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2003-02-01 21:27:55 (GMT)
committerKevin B Kenny <kennykb@acm.org>2003-02-01 21:27:55 (GMT)
commit2186d565ba4e59be880114e0330457cc9143c2d4 (patch)
treef7a72eb5e68ad525b2295b75f172ec476cd10ab5 /tests
parentba1f1f1fd02bbc394411bd61da4b5dcf87439b60 (diff)
downloadtcl-2186d565ba4e59be880114e0330457cc9143c2d4.zip
tcl-2186d565ba4e59be880114e0330457cc9143c2d4.tar.gz
tcl-2186d565ba4e59be880114e0330457cc9143c2d4.tar.bz2
* generic/tclClock.c: Fixed a bug that incorrectly allowed
[clock clicks {}] and [clock clicks -] to be accepted as if they were [clock clicks -milliseconds]. * tests/clock.test: Added regression tests for the above bug. [Bug 675356]
Diffstat (limited to 'tests')
-rw-r--r--tests/clock.test8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/clock.test b/tests/clock.test
index cc77260..745c095 100644
--- a/tests/clock.test
+++ b/tests/clock.test
@@ -10,7 +10,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.21 2002/07/05 11:16:01 rmax Exp $
+# RCS: @(#) $Id: clock.test,v 1.22 2003/02/01 21:27:55 kennykb Exp $
set env(LC_TIME) POSIX
@@ -51,6 +51,12 @@ test clock-2.5 {clock clicks tests, millisecond timing test} {
# 60 msecs seems to be the max time slice under Windows 95/98
expr {($end > $start) && (($end - $start) <= 60)}
} {1}
+test clock-2.6 {clock clicks, milli with too much abbreviation} {
+ list [catch { clock clicks {} } msg] $msg
+} {1 {bad switch "": must be -milliseconds}}
+test clock-2.7 {clock clicks, milli with too much abbreviation} {
+ list [catch { clock clicks - } msg] $msg
+} {1 {bad switch "-": must be -milliseconds}}
# clock format
test clock-3.1 {clock format tests} {unixOnly} {