summaryrefslogtreecommitdiffstats
path: root/tests/proc.test
diff options
context:
space:
mode:
authormsofer <msofer@noemail.net>2004-09-22 15:48:20 (GMT)
committermsofer <msofer@noemail.net>2004-09-22 15:48:20 (GMT)
commit442ca11b80d43fc30dd4a2a770f634d7f34bf367 (patch)
tree7db172f915c75d1855a3c835d5b9a4989a435d62 /tests/proc.test
parent89eededee2604b1c5fd558348ac8f5bba473acba (diff)
downloadtcl-442ca11b80d43fc30dd4a2a770f634d7f34bf367.zip
tcl-442ca11b80d43fc30dd4a2a770f634d7f34bf367.tar.gz
tcl-442ca11b80d43fc30dd4a2a770f634d7f34bf367.tar.bz2
* generic/tclExecute.c (INST_START_CMD):
* tests/proc.test (7.2-3): fix for [Bug 729692] was incorrect whenever a loop exception was returned. FossilOrigin-Name: 00f84eda0b0e51689692afb65fff9a8ff92e5827
Diffstat (limited to 'tests/proc.test')
-rw-r--r--tests/proc.test32
1 files changed, 31 insertions, 1 deletions
diff --git a/tests/proc.test b/tests/proc.test
index 988fb0f..bef0948 100644
--- a/tests/proc.test
+++ b/tests/proc.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: proc.test,v 1.16 2004/05/19 12:54:56 dkf Exp $
+# RCS: @(#) $Id: proc.test,v 1.17 2004/09/22 15:48:23 msofer Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -333,6 +333,36 @@ test proc-7.1 {Redefining a compiled cmd: Bug 729692} {
foo
} bar
+test proc-7.2 {Shadowing a compiled cmd: Bug 729692} {
+ namespace eval ugly {}
+ proc ugly::foo {} {
+ proc set args {return bar}
+ set x 1
+ }
+ set res [list [catch {ugly::foo} msg] $msg]
+ namespace delete ugly
+ set res
+} {0 bar}
+
+test proc-7.3 {Returning loop exception from redefined cmd: Bug 729692} {
+ namespace eval ugly {}
+ proc ugly::foo {} {
+ set i 0
+ while { 1 } {
+ if { [incr i] > 3 } {
+ proc continue {} {return -code break}
+ }
+ continue
+ }
+ return $i
+ }
+ set res [list [catch {ugly::foo} msg] $msg]
+ namespace delete ugly
+ set res
+} {0 4}
+
+
+
# cleanup
catch {rename p ""}
catch {rename t ""}