diff options
author | dgp <dgp@users.sourceforge.net> | 2009-11-16 18:00:11 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2009-11-16 18:00:11 (GMT) |
commit | bce1984cd71b25499760b589bfe695ffb6213d83 (patch) | |
tree | 26a12433839436b7c432fcfc0b29c7557ad65873 /tests | |
parent | 3ffda83a5b3d9b03fa4bad1e5384919a46adf47a (diff) | |
download | tcl-bce1984cd71b25499760b589bfe695ffb6213d83.zip tcl-bce1984cd71b25499760b589bfe695ffb6213d83.tar.gz tcl-bce1984cd71b25499760b589bfe695ffb6213d83.tar.bz2 |
Revert mistaken commit
Diffstat (limited to 'tests')
-rw-r--r-- | tests/cmdMZ.test | 28 | ||||
-rw-r--r-- | tests/error.test | 24 | ||||
-rw-r--r-- | tests/execute.test | 6 | ||||
-rw-r--r-- | tests/info.test | 10 | ||||
-rw-r--r-- | tests/init.test | 4 |
5 files changed, 25 insertions, 47 deletions
diff --git a/tests/cmdMZ.test b/tests/cmdMZ.test index 8ae7a3a..c0f2738 100644 --- a/tests/cmdMZ.test +++ b/tests/cmdMZ.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: cmdMZ.test,v 1.27 2009/11/16 17:38:09 ferrieux Exp $ +# RCS: @(#) $Id: cmdMZ.test,v 1.28 2009/11/16 18:00:11 dgp Exp $ if {[catch {package require tcltest 2.1}]} { puts stderr "Skipping tests in [info script]. tcltest 2.1 required." @@ -119,18 +119,18 @@ proc dictSort {d} { return $result } -test cmdMZ-return-2.0 {return option handling} -body { +test cmdMZ-return-2.0 {return option handling} { list [catch return -> foo] [dictSort $foo] -} -match glob -result {2 {-code 0 -errorstack * -level 1}} -test cmdMZ-return-2.1 {return option handling} -body { +} {2 {-code 0 -level 1}} +test cmdMZ-return-2.1 {return option handling} { list [catch {return -bar soom} -> foo] [dictSort $foo] -} -match glob -result {2 {-bar soom -code 0 -errorstack * -level 1}} -test cmdMZ-return-2.2 {return option handling} -body { +} {2 {-bar soom -code 0 -level 1}} +test cmdMZ-return-2.2 {return option handling} { list [catch {return -code return} -> foo] [dictSort $foo] -} -match glob -result {2 {-code 0 -errorstack * -level 2}} -test cmdMZ-return-2.3 {return option handling} -body { +} {2 {-code 0 -level 2}} +test cmdMZ-return-2.3 {return option handling} { list [catch {return -code return -level 10} -> foo] [dictSort $foo] -} -match glob -result {2 {-code 0 -errorstack * -level 11}} +} {2 {-code 0 -level 11}} test cmdMZ-return-2.4 {return option handling} -body { return -level 0 -code error } -returnCodes error -result {} @@ -149,14 +149,14 @@ test cmdMZ-return-2.8 {return option handling} -body { test cmdMZ-return-2.9 {return option handling} -body { return -level 0 -code 10 } -returnCodes 10 -result {} -test cmdMZ-return-2.10 {return option handling} -body { +test cmdMZ-return-2.10 {return option handling} { list [catch {return -level 0 -code error} -> foo] [dictSort $foo] -} -match glob -result {1 {-code 1 -errorcode NONE -errorinfo { +} {1 {-code 1 -errorcode NONE -errorinfo { while executing -"return -level 0 -code error"} -errorline 1 -errorstack * -level 0}} -test cmdMZ-return-2.11 {return option handling} -body { +"return -level 0 -code error"} -errorline 1 -level 0}} +test cmdMZ-return-2.11 {return option handling} { list [catch {return -level 0 -code break} -> foo] [dictSort $foo] -} -match glob -result {3 {-code 3 -errorstack * -level 0}} +} {3 {-code 3 -level 0}} test cmdMZ-return-2.12 {return option handling} -body { return -level 0 -code error -options {-code ok} } -returnCodes ok -result {} diff --git a/tests/error.test b/tests/error.test index 1b0f0fa..f522008 100644 --- a/tests/error.test +++ b/tests/error.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: error.test,v 1.23 2009/11/16 17:38:09 ferrieux Exp $ +# RCS: @(#) $Id: error.test,v 1.24 2009/11/16 18:00:11 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -153,19 +153,6 @@ test error-4.5 {errorInfo and errorCode variables} { list [catch {error msg1 msg2 {}} msg] $msg $::errorInfo $::errorCode } {1 msg1 msg2 {}} -test error-4.6 {errorstack via info } -body { - proc f x {g $x$x} - proc g x {error G:$x} - catch {f 12} - info errorstack -} -match glob -result {{g 1212} {f 12} {namespace eval *}} -test error-4.7 {errorstack via options dict } -body { - proc f x {g $x$x} - proc g x {error G:$x} - catch {f 12} m d - dict get $d -errorstack -} -match glob -result {{g 1212} {f 12} {namespace eval *}} - # Errors in error command itself test error-5.1 {errors in error command} { @@ -220,15 +207,6 @@ test error-6.9 {catch must reset error state} { catch foo list $::errorCode } {NONE} -test error-6.10 {catch must reset errorstack} -body { - proc f x {g $x$x} - proc g x {error G:$x} - catch {f 12} - set e1 [info errorstack] - catch {f 13} - set e2 [info errorstack] - list $e1 $e2 -} -match glob -result {{{g 1212} {f 12} {namespace eval *}} {{g 1313} {f 13} {namespace eval *}}} test error-7.1 {Bug 1397843} -body { variable cmds diff --git a/tests/execute.test b/tests/execute.test index aa9e943..87f835e 100644 --- a/tests/execute.test +++ b/tests/execute.test @@ -14,7 +14,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: execute.test,v 1.33 2009/11/16 17:38:09 ferrieux Exp $ +# RCS: @(#) $Id: execute.test,v 1.34 2009/11/16 18:00:11 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -956,11 +956,11 @@ test execute-8.5 {Bug 2038069} -setup { demo } -cleanup { rename demo {} -} -match glob -result {-code 1 -level 0 -errorcode NONE -errorinfo {FOO +} -result {-code 1 -level 0 -errorcode NONE -errorinfo {FOO while executing "error FOO" invoked from within -"catch \[list error FOO\] m o"} -errorline 2 -errorstack *} +"catch [list error FOO] m o"} -errorline 2} test execute-9.1 {Interp result resetting [Bug 1522803]} { set c 0 diff --git a/tests/info.test b/tests/info.test index aa4a29f..2a1998e 100644 --- a/tests/info.test +++ b/tests/info.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: info.test,v 1.72 2009/11/16 17:38:09 ferrieux Exp $ +# RCS: @(#) $Id: info.test,v 1.73 2009/11/16 18:00:11 dgp Exp $ if {{::tcltest} ni [namespace children]} { package require tcltest 2 @@ -676,16 +676,16 @@ test info-21.1 {miscellaneous error conditions} -returnCodes error -body { } -result {wrong # args: should be "info subcommand ?arg ...?"} test info-21.2 {miscellaneous error conditions} -returnCodes error -body { info gorp -} -result {unknown or ambiguous subcommand "gorp": must be args, body, class, cmdcount, commands, complete, coroutine, default, errorstack, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} +} -result {unknown or ambiguous subcommand "gorp": must be args, body, class, cmdcount, commands, complete, coroutine, default, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} test info-21.3 {miscellaneous error conditions} -returnCodes error -body { info c -} -result {unknown or ambiguous subcommand "c": must be args, body, class, cmdcount, commands, complete, coroutine, default, errorstack, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} +} -result {unknown or ambiguous subcommand "c": must be args, body, class, cmdcount, commands, complete, coroutine, default, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} test info-21.4 {miscellaneous error conditions} -returnCodes error -body { info l -} -result {unknown or ambiguous subcommand "l": must be args, body, class, cmdcount, commands, complete, coroutine, default, errorstack, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} +} -result {unknown or ambiguous subcommand "l": must be args, body, class, cmdcount, commands, complete, coroutine, default, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} test info-21.5 {miscellaneous error conditions} -returnCodes error -body { info s -} -result {unknown or ambiguous subcommand "s": must be args, body, class, cmdcount, commands, complete, coroutine, default, errorstack, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} +} -result {unknown or ambiguous subcommand "s": must be args, body, class, cmdcount, commands, complete, coroutine, default, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} ## # ### ### ### ######### ######### ######### diff --git a/tests/init.test b/tests/init.test index b5eba4c..0a49472 100644 --- a/tests/init.test +++ b/tests/init.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: init.test,v 1.20 2009/11/16 17:38:09 ferrieux Exp $ +# RCS: @(#) $Id: init.test,v 1.21 2009/11/16 18:00:11 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -181,7 +181,7 @@ test init-5.0 {return options passed through ::unknown} -setup { list $code $foo $bar $code2 $foo2 $bar2 } -cleanup { unset ::auto_index(::xxx) -} -match glob -result {2 xxx {-errorcode NONE -errorstack * -code 1 -level 1} 2 xxx {-code 1 -level 1 -errorcode NONE -errorstack *}} +} -result {2 xxx {-errorcode NONE -code 1 -level 1} 2 xxx {-code 1 -level 1 -errorcode NONE}} cleanupTests } ;# End of [interp eval $testInterp] |