summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorhobbs <hobbs>2001-08-29 23:22:24 (GMT)
committerhobbs <hobbs>2001-08-29 23:22:24 (GMT)
commite3a110a35f440dc46497f8855d741f173ed1caab (patch)
treeb404a0f0e067dd1a6d688e026ad74d4ead531b81 /tests
parent55991e0edd4f43e955b9087fa9a0f94752aecac7 (diff)
downloadtk-e3a110a35f440dc46497f8855d741f173ed1caab.zip
tk-e3a110a35f440dc46497f8855d741f173ed1caab.tar.gz
tk-e3a110a35f440dc46497f8855d741f173ed1caab.tar.bz2
* tests/config.test: added config-14.1 to test namespace import
evaluation of widgets. * generic/tkButton.c (ButtonCreate): * generic/tkFrame.c (CreateFrame): * generic/tkMenubutton.c (Tk_MenubuttonObjCmd): * generic/tkPlace.c (Tk_PlaceObjCmd): * generic/tkScale.c (Tk_ScaleObjCmd): * generic/tkMessage.c (Tk_MessageObjCmd): * generic/tkEntry.c (Tk_EntryObjCmd, Tk_SpinboxObjCmd): * generic/tkSquare.c (SquareObjCmd): redid the handling of optionTables in widgets to allow them to be imported into other namespaces. [Bug #456632]
Diffstat (limited to 'tests')
-rw-r--r--tests/config.test22
1 files changed, 20 insertions, 2 deletions
diff --git a/tests/config.test b/tests/config.test
index 078c3f5..34c81fd 100644
--- a/tests/config.test
+++ b/tests/config.test
@@ -6,7 +6,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: config.test,v 1.4 2000/09/17 21:02:40 ericm Exp $
+# RCS: @(#) $Id: config.test,v 1.5 2001/08/29 23:22:24 hobbs Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
source [file join [pwd] [file dirname [info script]] defs.tcl]
@@ -864,7 +864,25 @@ test config-13.1 {proper cleanup of options with widget destroy} {
} {
destroy .w
$type .w -cursor crosshair
- destroy .w
+ destroy .w
+ }
+} {}
+
+eval destroy [winfo children .]
+
+test config-14.1 {Tk_CreateOptionTable - use with namespace import} {
+ namespace export -clear *
+ foreach type {
+ button canvas entry frame listbox menu menubutton message
+ scale scrollbar spinbox text radiobutton checkbutton
+ } {
+ namespace eval ::foo [subst {
+ namespace import -force ::$type
+ ::foo::$type .a
+ ::foo::$type .b
+ }
+ ]
+ destroy .a .b
}
} {}