summaryrefslogtreecommitdiffstats
path: root/tests/timer.test
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2005-11-09 21:28:36 (GMT)
committerKevin B Kenny <kennykb@acm.org>2005-11-09 21:28:36 (GMT)
commitc58a554a8152ee69ceb992395233d72e0a9980ae (patch)
treeb8e72eb3b91b85ab74bfe8de0b08ab99ccd3da01 /tests/timer.test
parentb5f5b5fa34bbbcbb8a90af22e0e8bbd0afad046a (diff)
downloadtcl-c58a554a8152ee69ceb992395233d72e0a9980ae.zip
tcl-c58a554a8152ee69ceb992395233d72e0a9980ae.tar.gz
tcl-c58a554a8152ee69ceb992395233d72e0a9980ae.tar.bz2
bugs 1350291 and 1350293
Diffstat (limited to 'tests/timer.test')
-rw-r--r--tests/timer.test34
1 files changed, 31 insertions, 3 deletions
diff --git a/tests/timer.test b/tests/timer.test
index 800857b..6eecb7c 100644
--- a/tests/timer.test
+++ b/tests/timer.test
@@ -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: timer.test,v 1.11 2004/11/18 19:22:14 dgp Exp $
+# RCS: @(#) $Id: timer.test,v 1.12 2005/11/09 21:28:36 kennykb Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -177,10 +177,10 @@ test timer-6.1 {Tcl_AfterCmd procedure, basics} {
} {1 {wrong # args: should be "after option ?arg arg ...?"}}
test timer-6.2 {Tcl_AfterCmd procedure, basics} {
list [catch {after 2x} msg] $msg
-} {1 {expected integer but got "2x"}}
+} {1 {bad argument "2x": must be cancel, idle, info, or an integer}}
test timer-6.3 {Tcl_AfterCmd procedure, basics} {
list [catch {after gorp} msg] $msg
-} {1 {bad argument "gorp": must be cancel, idle, info, or a number}}
+} {1 {bad argument "gorp": must be cancel, idle, info, or an integer}}
test timer-6.4 {Tcl_AfterCmd procedure, ms argument} {
set x before
after 400 {set x after}
@@ -552,6 +552,34 @@ test timer-10.1 {Bug 1016167: [after] overwrites imports} -setup {
interp delete slave
} -result ::after
+test timer-11.1 {Bug 1350291: [after] overflowing 32-bit field} \
+ -body {
+ set b ok
+ set a [after 0x100000001 {set b "after fired early"}]
+ after 100 set done 1
+ vwait done
+ set b
+ } \
+ -cleanup {
+ catch {after cancel $a}
+ } \
+ -result ok
+
+test timer-11.2 {Bug 1350293: [after] negative argument} \
+ -body {
+ set l {}
+ after 100 {lappend l 100; set done 1}
+ after -1 {lappend l -1}
+ vwait done
+ set l
+ } \
+ -result {-1 100}
+
+
# cleanup
::tcltest::cleanupTests
return
+
+# Local Variables:
+# mode: tcl
+# End: