summaryrefslogtreecommitdiffstats
path: root/tests/config.test
diff options
context:
space:
mode:
authorhobbs <hobbs>2001-08-29 23:22:24 (GMT)
committerhobbs <hobbs>2001-08-29 23:22:24 (GMT)
commitc0bb952520e32d12b6acd32d4d15b42dc32c5460 (patch)
treeb404a0f0e067dd1a6d688e026ad74d4ead531b81 /tests/config.test
parent09cdf4ebed18b4c3c37234074102fc6b6191cf8c (diff)
downloadtk-c0bb952520e32d12b6acd32d4d15b42dc32c5460.zip
tk-c0bb952520e32d12b6acd32d4d15b42dc32c5460.tar.gz
tk-c0bb952520e32d12b6acd32d4d15b42dc32c5460.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/config.test')
-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
}
} {}