summaryrefslogtreecommitdiffstats
path: root/tests/timer.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2004-11-18 19:22:07 (GMT)
committerdgp <dgp@users.sourceforge.net>2004-11-18 19:22:07 (GMT)
commit4e5e1d3ec698a9eb79f0201885584f3f8d233d35 (patch)
treeb799cc820fa33ab33c4d999c17c6882513c0865e /tests/timer.test
parent3727bd7f9afd5d6505ad727831ed2afc3723c316 (diff)
downloadtcl-4e5e1d3ec698a9eb79f0201885584f3f8d233d35.zip
tcl-4e5e1d3ec698a9eb79f0201885584f3f8d233d35.tar.gz
tcl-4e5e1d3ec698a9eb79f0201885584f3f8d233d35.tar.bz2
* tests/basic.test: Updated functional (not testing) uses of
* tests/io.test: [bgerror] to make use of [interp bgerror]. * tests/socket.test: * tests/timer.test: * generic/tclInterp.c: Corrected [interp bgerror] error message.
Diffstat (limited to 'tests/timer.test')
-rw-r--r--tests/timer.test20
1 files changed, 11 insertions, 9 deletions
diff --git a/tests/timer.test b/tests/timer.test
index 2954507..800857b 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.10 2004/09/07 19:12:42 kennykb Exp $
+# RCS: @(#) $Id: timer.test,v 1.11 2004/11/18 19:22:14 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -455,20 +455,22 @@ test timer-8.1 {AfterProc procedure} {
}
list [foo] $x
} {untouched after}
-test timer-8.2 {AfterProc procedure} {
- catch {rename bgerror {}}
- proc bgerror msg {
- global x errorInfo
- set x [list $msg $errorInfo]
+test timer-8.2 {AfterProc procedure} -setup {
+ variable x empty
+ proc myHandler {msg options} {
+ variable x [list $msg [dict get $options -errorinfo]]
}
- set x empty
+ set handler [interp bgerror {}]
+ interp bgerror {} [namespace which myHandler]
+} -body {
after 100 {error "After error"}
after 200
set y $x
update
- catch {rename bgerror {}}
list $y $x
-} {empty {{After error} {After error
+} -cleanup {
+ interp bgerror {} $handler
+} -result {empty {{After error} {After error
while executing
"error "After error""
("after" script)}}}