summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/oo.test30
1 files changed, 29 insertions, 1 deletions
diff --git a/tests/oo.test b/tests/oo.test
index 8ff06e8..ea97bf2 100644
--- a/tests/oo.test
+++ b/tests/oo.test
@@ -7,7 +7,7 @@
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: oo.test,v 1.9 2008/07/25 22:11:21 andreas_kupries Exp $
+# RCS: @(#) $Id: oo.test,v 1.10 2008/08/06 21:23:15 dgp Exp $
package require TclOO 0.4 ;# Must match value in configure.in
if {[lsearch [namespace children] ::tcltest] == -1} {
@@ -1787,6 +1787,34 @@ test oo-25.1 {call chain caching} -setup {
lappend result [foo $m1] [bar $m2]
} -result {ok ok ok ok ok ok good ok}
+test oo-26.1 {Bug 2037727} -setup {
+ proc succeed args {}
+ oo::object create example
+} -body {
+ oo::objdefine example method foo {} {succeed}
+ example foo
+ proc succeed {} {return succeed}
+ example foo
+} -cleanup {
+ example destroy
+ rename succeed {}
+} -result succeed
+
+test oo-26.2 {Bug 2037727} -setup {
+ oo::class create example {
+ method namespace {} {self namespace}
+ method foo {} {succeed}
+ }
+ example create i1
+ example create i2
+ namespace eval [i1 namespace] {proc succeed args {}}
+ namespace eval [i2 namespace] {proc succeed args {return succeed}}
+} -body {
+ list [i1 foo] [i2 foo]
+} -cleanup {
+ example destroy
+} -result {{} succeed}
+
cleanupTests
return