summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2009-01-29 15:57:54 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2009-01-29 15:57:54 (GMT)
commit1613b73f3d0c97fc20285de5b2c1e90eed432fdc (patch)
tree8bd0f5809a9a2ae43bcedeb5654b3693b1d2a8e1 /tests
parent7d0d8f85ee8ad595801e30135e4cde40d6707ccd (diff)
downloadtcl-1613b73f3d0c97fc20285de5b2c1e90eed432fdc.zip
tcl-1613b73f3d0c97fc20285de5b2c1e90eed432fdc.tar.gz
tcl-1613b73f3d0c97fc20285de5b2c1e90eed432fdc.tar.bz2
Fix [Bug 2519474]
Diffstat (limited to 'tests')
-rw-r--r--tests/oo.test14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/oo.test b/tests/oo.test
index 5db928e..e0b07b2 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.21 2009/01/27 11:11:47 dkf Exp $
+# RCS: @(#) $Id: oo.test,v 1.22 2009/01/29 15:57:54 dkf Exp $
package require TclOO 0.6.1 ;# Must match value in generic/tclOO.h
if {[lsearch [namespace children] ::tcltest] == -1} {
@@ -209,6 +209,18 @@ test oo-1.17 {basic test of OO functionality: Bug 2481109} -body {
} -cleanup {
namespace delete ::foo
} -result ::foo::lreplace
+# Check for Bug 2519474; problem in tclNamesp.c, but tested here...
+test oo-1.18 {OO: create object in NS with same name as global cmd} -setup {
+ proc test-oo-1.18 {} return
+ oo::class create A
+ oo::class create B {superclass A}
+} -body {
+ oo::define B constructor {} {A create test-oo-1.18}
+ B create C
+} -cleanup {
+ rename test-oo-1.18 {}
+ A destroy
+} -result ::C
test oo-2.1 {basic test of OO functionality: constructor} -setup {
# This is a bit complex because it needs to run in a sub-interp as