summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2008-05-20 22:22:14 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2008-05-20 22:22:14 (GMT)
commita1ca307c098bd1b12e73b18eb500707296e084ca (patch)
treed20e5333aee55b716637ba25b7de217b6e49fef6 /tests
parentecf4164c6f084705cf96b0610c3bfc82c44a094f (diff)
downloadtcl-a1ca307c098bd1b12e73b18eb500707296e084ca.zip
tcl-a1ca307c098bd1b12e73b18eb500707296e084ca.tar.gz
tcl-a1ca307c098bd1b12e73b18eb500707296e084ca.tar.bz2
Correct logic for handling error cases when setting the namespace unknown handler.
Diffstat (limited to 'tests')
-rw-r--r--tests/namespace.test13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/namespace.test b/tests/namespace.test
index e445189..9fb2d9a 100644
--- a/tests/namespace.test
+++ b/tests/namespace.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: namespace.test,v 1.70 2007/12/13 15:26:06 dgp Exp $
+# RCS: @(#) $Id: namespace.test,v 1.71 2008/05/20 22:22:17 dkf Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -2619,7 +2619,16 @@ test namespace-52.11 {unknown: with TCL_EVAL_INVOKE} -setup {
rename unknown.save ::unknown
namespace eval :: [list namespace unknown $handler]
} -result SUCCESS
-
+test namespace-52.12 {unknown: error case must not reset handler} -body {
+ namespace eval foo {
+ namespace unknown ok
+ catch {namespace unknown {{}{}{}}}
+ namespace unknown
+ }
+} -cleanup {
+ namespace delete foo
+} -result ok
+
# cleanup
catch {rename cmd1 {}}
catch {unset l}