OSDN Git Service

Updated to tk 8.4.1
[pf3gnuchains/sourceware.git] / tk / tests / macWinMenu.test
index 8e59d00..23919b3 100644 (file)
@@ -8,32 +8,12 @@
 #
 # RCS: @(#) $Id$
 
-if {[lsearch [namespace children] ::tcltest] == -1} {
-    source [file join [pwd] [file dirname [info script]] defs.tcl]
-}
-
-if {[lsearch [image types] test] < 0} {
-    puts "This application hasn't been compiled with the \"test\" image"
-    puts "type, so I can't run this test.  Are you sure you're using"
-    puts "tktest instead of wish?"
-    ::tcltest::cleanupTests
-    return
-}
-
-# Some tests require user interaction on non-unix platform
-set ::tcltest::testConfig(nonUnixUserInteraction) \
-    [expr {$::tcltest::testConfig(userInteraction) || \
-       $::tcltest::testConfig(unixOnly)}]
-
-proc deleteWindows {} {
-    foreach i [winfo children .] {
-       catch [destroy $i]
-    }
-}
-
-deleteWindows
-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
 
 test macWinMenu-1.1 {PreprocessMenu} {macOrPc nonUnixUserInteraction} {
     catch {destroy .m1}