diff options
author | aniap <aniap@noemail.net> | 2008-07-22 11:39:07 (GMT) |
---|---|---|
committer | aniap <aniap@noemail.net> | 2008-07-22 11:39:07 (GMT) |
commit | aac6af28ccf30b779d647094782c977e02e1d381 (patch) | |
tree | d4edd84507a22d4bf3e5baf014bcff25d40685f7 /tests/bgerror.test | |
parent | ac01c4cae3a7188eaafbea88d3207817b2aa4fcc (diff) | |
download | tk-aac6af28ccf30b779d647094782c977e02e1d381.zip tk-aac6af28ccf30b779d647094782c977e02e1d381.tar.gz tk-aac6af28ccf30b779d647094782c977e02e1d381.tar.bz2 |
Update to tcltest2
FossilOrigin-Name: 89e272f9e35f054b3781a1aedf097db72993a7d7
Diffstat (limited to 'tests/bgerror.test')
-rw-r--r-- | tests/bgerror.test | 47 |
1 files changed, 28 insertions, 19 deletions
diff --git a/tests/bgerror.test b/tests/bgerror.test index 7d35862..6148c71 100644 --- a/tests/bgerror.test +++ b/tests/bgerror.test @@ -5,51 +5,60 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: bgerror.test,v 1.6 2004/05/23 17:34:48 dkf Exp $ +# RCS: @(#) $Id: bgerror.test,v 1.7 2008/07/22 11:48:24 aniap Exp $ -package require tcltest 2.1 +package require tcltest 2.2 +namespace import ::tcltest::* eval tcltest::configure $argv tcltest::loadTestedCommands -test bgerror-1.1 {bgerror / tkerror compat} { +test bgerror-1.1 {bgerror / tkerror compat} -setup { set errRes {} proc tkerror {err} { - global errRes; - set errRes $err; + global errRes; + set errRes $err; } +} -body { after 0 {error err1} vwait errRes; - set errRes; -} err1 + return $errRes; +} -cleanup { + catch {rename tkerror {}} +} -result {err1} -test bgerror-1.2 {bgerror / tkerror compat / accumulation} { +test bgerror-1.2 {bgerror / tkerror compat / accumulation} -setup { set errRes {} proc tkerror {err} { - global errRes; - lappend errRes $err; + global errRes; + lappend errRes $err; } +} -body { after 0 {error err1} after 0 {error err2} after 0 {error err3} update - set errRes; -} {err1 err2 err3} + return $errRes; +} -cleanup { + catch {rename tkerror {}} +} -result {err1 err2 err3} -test bgerror-1.3 {bgerror / tkerror compat / accumulation / break} { +test bgerror-1.3 {bgerror / tkerror compat / accumulation / break} -setup { set errRes {} proc tkerror {err} { - global errRes; - lappend errRes $err; - return -code break "skip!"; + global errRes; + lappend errRes $err; + return -code break "skip!"; } +} -body { after 0 {error err1} after 0 {error err2} after 0 {error err3} update - set errRes; -} err1 + return $errRes; +} -cleanup { + catch {rename tkerror {}} +} -result {err1} -catch {rename tkerror {}} # some testing of the default error dialog # would be needed too, but that's not easy at all |