summaryrefslogtreecommitdiffstats
path: root/tests/winMenu.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/winMenu.test')
-rw-r--r--tests/winMenu.test34
1 files changed, 10 insertions, 24 deletions
diff --git a/tests/winMenu.test b/tests/winMenu.test
index afa5ca0..9e79c33 100644
--- a/tests/winMenu.test
+++ b/tests/winMenu.test
@@ -7,28 +7,14 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: winMenu.test,v 1.5 2002/07/12 13:41:01 dgp Exp $
+# RCS: @(#) $Id: winMenu.test,v 1.6 2002/07/13 20:28:36 dgp Exp $
package require tcltest 2.1
-namespace import -force tcltest::test
-eval tcltest::configure $argv
-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
-}
-
-proc deleteWindows {} {
- foreach i [winfo children .] {
- catch [destroy $i]
- }
-}
-
-deleteWindows
-wm geometry . {}
-raise .
+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 winMenu-1.1 {GetNewID} {pcOnly} {
catch {destroy .m1}
@@ -80,7 +66,7 @@ test winMenu-6.1 {GetEntryText} {pcOnly} {
catch {destroy .m1}
list [catch {menu .m1} msg] $msg [destroy .m1]
} {0 .m1 {}}
-test winMenu-6.2 {GetEntryText} {pcOnly} {
+test winMenu-6.2 {GetEntryText} {testImageType pcOnly} {
catch {destroy .m1}
catch {image delete image1}
menu .m1
@@ -832,7 +818,7 @@ test winMenu-29.22 {TkpDrawMenuEntry - indicator} {pcOnly} {
list [update] [destroy .m1]
} {{} {}}
-test winMenu-30.1 {GetMenuLabelGeometry - image} {pcOnly} {
+test winMenu-30.1 {GetMenuLabelGeometry - image} {testImageType pcOnly} {
catch {destroy .m1}
catch {image delete image1}
menu .m1
@@ -966,7 +952,7 @@ test winMenu-32.13 {TkpComputeStandardMenuGeometry - indicator} {pcOnly} {
} {{} {}}
test winMenu-32.14 \
{TkpComputeStandardMenuGeometry - second indicator less or equal} \
- {pcOnly} {
+ {testImageType pcOnly} {
catch {destroy .m1}
catch {image delete image1}
image create test image1
@@ -978,7 +964,7 @@ test winMenu-32.14 \
list [update idletasks] [destroy .m1] [image delete image1]
} {{} {} {}}
test winMenu-32.15 {TkpComputeStandardMenuGeometry - second indicator larger} \
- {unixOnly} {
+ {testImageType unixOnly} {
catch {destroy .m1}
catch {image delete image1}
image create test image1