diff options
author | dgp <dgp@users.sourceforge.net> | 2005-05-24 19:13:34 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2005-05-24 19:13:34 (GMT) |
commit | f4ce59d358e3993aa45141bf6f1c37c1166ae2ec (patch) | |
tree | f7a4fd5653f062aba04696fd3b104bdd9c1572d9 /tests/init.test | |
parent | bb17f9d11c315a654f2e7b46df81202e61e18a50 (diff) | |
download | tcl-f4ce59d358e3993aa45141bf6f1c37c1166ae2ec.zip tcl-f4ce59d358e3993aa45141bf6f1c37c1166ae2ec.tar.gz tcl-f4ce59d358e3993aa45141bf6f1c37c1166ae2ec.tar.bz2 |
* library/init.tcl: Updated [unknown] to be sure the [return]
* tests/init.test: options from an auto-loaded command are
seen correctly by the caller.
Diffstat (limited to 'tests/init.test')
-rw-r--r-- | tests/init.test | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/init.test b/tests/init.test index 7fc8baa..694ce74 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.13 2004/10/26 16:46:16 dgp Exp $ +# RCS: @(#) $Id: init.test,v 1.14 2005/05/24 19:13:46 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -196,6 +196,19 @@ foreach arg [subst -nocommands -novariables { incr count } +test init-5.0 {return options passed through ::unknown} -setup { + catch {rename xxx {}} + set ::auto_index(::xxx) {proc ::xxx {} { + return -code error -level 2 xxx + }} +} -body { + set code [catch {::xxx} foo bar] + set code2 [catch {::xxx} foo2 bar2] + list $code $foo $bar $code2 $foo2 $bar2 +} -cleanup { + unset ::auto_index(::xxx) +} -result {2 xxx {-code 1 -level 1} 2 xxx {-code 1 -level 1}} + cleanupTests } ;# End of [interp eval $testInterp] |