summaryrefslogtreecommitdiff
path: root/tk/tests/winButton.test
diff options
context:
space:
mode:
Diffstat (limited to 'tk/tests/winButton.test')
-rw-r--r--tk/tests/winButton.test48
1 files changed, 30 insertions, 18 deletions
diff --git a/tk/tests/winButton.test b/tk/tests/winButton.test
index 509aaa258c7..9e2a2e17b88 100644
--- a/tk/tests/winButton.test
+++ b/tk/tests/winButton.test
@@ -5,27 +5,23 @@
#
# Copyright (c) 1994 The Regents of the University of California.
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+# Copyright (c) 1998-1999 by Scriptics Corporation.
+# All rights reserved.
#
# RCS: @(#) $Id$
-if {$tcl_platform(platform)!="windows"} {
- return
+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\""
puts "image, so I can't run this test. Are you sure you're using"
puts "tktest instead of wish?"
+ ::tcltest::cleanupTests
return
}
-if {[info procs test] != "test"} {
- source defs
-}
-
foreach i [winfo children .] {
destroy $i
}
@@ -47,7 +43,7 @@ radiobutton .r -text Radiobutton
pack .l .b .c .r
update
-test winbutton-1.1 {TkpComputeButtonGeometry procedure} {
+test winbutton-1.1 {TkpComputeButtonGeometry procedure} {pcOnly} {
eval destroy [winfo children .]
image create test image1
image1 changed 0 0 0 0 60 40
@@ -62,7 +58,7 @@ test winbutton-1.1 {TkpComputeButtonGeometry procedure} {
[winfo reqwidth .b3] [winfo reqheight .b3] \
[winfo reqwidth .b4] [winfo reqheight .b4]
} {68 48 71 51 96 50 96 50}
-test winbutton-1.2 {TkpComputeButtonGeometry procedure} {
+test winbutton-1.2 {TkpComputeButtonGeometry procedure} {pcOnly} {
eval destroy [winfo children .]
label .b1 -bitmap question -bd 3 -padx 0 -pady 2
button .b2 -bitmap question -bd 3 -padx 0 -pady 2
@@ -75,7 +71,7 @@ test winbutton-1.2 {TkpComputeButtonGeometry procedure} {
[winfo reqwidth .b3] [winfo reqheight .b3] \
[winfo reqwidth .b4] [winfo reqheight .b4]
} {23 33 26 36 51 35 51 35}
-test winbutton-1.3 {TkpComputeButtonGeometry procedure} {
+test winbutton-1.3 {TkpComputeButtonGeometry procedure} {pcOnly} {
eval destroy [winfo children .]
label .b1 -bitmap question -bd 3 -highlightthickness 4
button .b2 -bitmap question -bd 3 -highlightthickness 0
@@ -89,7 +85,7 @@ test winbutton-1.3 {TkpComputeButtonGeometry procedure} {
[winfo reqwidth .b3] [winfo reqheight .b3] \
[winfo reqwidth .b4] [winfo reqheight .b4]
} {31 41 24 34 26 36 26 36}
-test winbutton-1.4 {TkpComputeButtonGeometry procedure} {nonPortable} {
+test winbutton-1.4 {TkpComputeButtonGeometry procedure} {pcOnly nonPortable} {
eval destroy [winfo children .]
label .b1 -text Xagqpim -bd 2 -padx 0 -pady 2 -font {{MS Sans Serif} 8}
button .b2 -text Xagqpim -bd 2 -padx 0 -pady 2 -font {{MS Sans Serif} 8}
@@ -102,21 +98,21 @@ test winbutton-1.4 {TkpComputeButtonGeometry procedure} {nonPortable} {
[winfo reqwidth .b3] [winfo reqheight .b3] \
[winfo reqwidth .b4] [winfo reqheight .b4]
} {58 24 67 33 88 30 90 28}
-test winbutton-1.5 {TkpComputeButtonGeometry procedure} {nonPortable} {
+test winbutton-1.5 {TkpComputeButtonGeometry procedure} {pcOnly nonPortable} {
eval destroy [winfo children .]
label .l1 -text "This is a long string that will wrap around on several lines.\n\nIt also has a blank line (above)." -wraplength 1.5i -padx 0 -pady 0
pack .l1
update
list [winfo reqwidth .l1] [winfo reqheight .l1]
} {178 84}
-test winbutton-1.6 {TkpComputeButtonGeometry procedure} {nonPortable} {
+test winbutton-1.6 {TkpComputeButtonGeometry procedure} {pcOnly nonPortable} {
eval destroy [winfo children .]
label .l1 -text "This is a long string without wrapping.\n\nIt also has a blank line (above)." -padx 0 -pady 0
pack .l1
update
list [winfo reqwidth .l1] [winfo reqheight .l1]
} {222 52}
-test winbutton-1.7 {TkpComputeButtonGeometry procedure} {nonPortable} {
+test winbutton-1.7 {TkpComputeButtonGeometry procedure} {pcOnly nonPortable} {
eval destroy [winfo children .]
label .b1 -text Xagqpim -bd 2 -padx 0 -pady 2 -width 10
button .b2 -text Xagqpim -bd 2 -padx 0 -pady 2 -height 5
@@ -129,7 +125,7 @@ test winbutton-1.7 {TkpComputeButtonGeometry procedure} {nonPortable} {
[winfo reqwidth .b3] [winfo reqheight .b3] \
[winfo reqwidth .b4] [winfo reqheight .b4]
} {74 24 67 97 174 46 64 28}
-test winbutton-1.8 {TkpComputeButtonGeometry procedure} {nonPortable} {
+test winbutton-1.8 {TkpComputeButtonGeometry procedure} {pcOnly nonPortable} {
eval destroy [winfo children .]
label .b1 -text Xagqpim -bd 2 -padx 0 -pady 2 \
-highlightthickness 4
@@ -145,10 +141,26 @@ test winbutton-1.8 {TkpComputeButtonGeometry procedure} {nonPortable} {
[winfo reqwidth .b3] [winfo reqheight .b3] \
[winfo reqwidth .b4] [winfo reqheight .b4]
} {66 32 65 31 69 31 71 29}
-test winbutton-1.9 {TkpComputeButtonGeometry procedure} {
+test winbutton-1.9 {TkpComputeButtonGeometry procedure} {pcOnly} {
eval destroy [winfo children .]
button .b2 -bitmap question -default normal
list [winfo reqwidth .b2] [winfo reqheight .b2]
} {24 34}
+# cleanup
eval destroy [winfo children .]
+::tcltest::cleanupTests
+return
+
+
+
+
+
+
+
+
+
+
+
+
+