summaryrefslogtreecommitdiffstats
path: root/tests/init.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/init.test')
-rw-r--r--tests/init.test15
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]