summaryrefslogtreecommitdiff
path: root/tk/tests/window.test
diff options
context:
space:
mode:
Diffstat (limited to 'tk/tests/window.test')
-rw-r--r--tk/tests/window.test19
1 files changed, 8 insertions, 11 deletions
diff --git a/tk/tests/window.test b/tk/tests/window.test
index 6d9371ba14d..3f57861d748 100644
--- a/tk/tests/window.test
+++ b/tk/tests/window.test
@@ -7,15 +7,13 @@
#
# RCS: @(#) $Id$
-if {[lsearch [namespace children] ::tcltest] == -1} {
- source [file join [pwd] [file dirname [info script]] defs.tcl]
-}
-
-foreach i [winfo children .] {
- destroy $i
-}
-wm geometry . {}
-raise .
+package require tcltest 2.1
+namespace import -force tcltest::configure
+namespace import -force tcltest::testsDirectory
+configure -testdir [file join [pwd] [file dirname [info script]]]
+configure -loadfile [file join [testsDirectory] constraints.tcl]
+tcltest::loadTestedCommands
+
update
# XXX This file is woefully incomplete. Right now it only tests
@@ -80,8 +78,7 @@ test window-2.3 {Tk_DestroyWindow procedure, destroy handler deletes parent} {
} {}
# Some tests require the testmenubar command
-set ::tcltest::testConfig(testmenubar) \
- [expr {[info commands testmenubar] != {}}]
+testConstraint testmenubar [llength [info commands testmenubar]]
test window-3.1 {Tk_MakeWindowExist procedure, stacking order and menubars} \
{unixOnly testmenubar} {