diff options
author | patthoyts <patthoyts@users.sourceforge.net> | 2006-10-17 10:21:48 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@users.sourceforge.net> | 2006-10-17 10:21:48 (GMT) |
commit | e58a5fcd90ad9607b9357a1c82417e651ad8ae18 (patch) | |
tree | f2e3c2358a8814697991e809019215ff5f2b3659 /tests/winWm.test | |
parent | df7092fbb134cfbb28d68c0deca1a6241df8ca02 (diff) | |
download | tk-e58a5fcd90ad9607b9357a1c82417e651ad8ae18.zip tk-e58a5fcd90ad9607b9357a1c82417e651ad8ae18.tar.gz tk-e58a5fcd90ad9607b9357a1c82417e651ad8ae18.tar.bz2 |
generic/tkText.c: Applied suggested patch from #1536735
tests/text.test: Update test for above patch.
tests/textWind.test: Corrected test to catch all messages
tests/safe.test: Silence spurious win32 failure awaiting TIP150
tests/winDialog.test: Updated test for file name length check.
test/winWm.test: Corrected test expectation for menu wrapping.
Diffstat (limited to 'tests/winWm.test')
-rw-r--r-- | tests/winWm.test | 42 |
1 files changed, 24 insertions, 18 deletions
diff --git a/tests/winWm.test b/tests/winWm.test index 95b71cb..e3b0d84 100644 --- a/tests/winWm.test +++ b/tests/winWm.test @@ -9,7 +9,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: winWm.test,v 1.16 2005/02/17 00:06:08 mdejong Exp $ +# RCS: @(#) $Id: winWm.test,v 1.17 2006/10/17 10:21:50 patthoyts Exp $ package require tcltest 2.1 eval tcltest::configure $argv @@ -22,14 +22,14 @@ frame .t.f -width 100 -height 50 pack .t.f menu .t.m .t.m add command -label "thisisreallylong" -.t conf -menu .t.m -wm geom .t -0-0 +.t configure -menu .t.m +wm geometry .t -0-0 update set menuheight [winfo y .t] .t.m add command -label "thisisreallylong" -wm geom .t -0-0 +wm geometry .t -0-0 update -set menuheight [expr $menuheight - [winfo y .t]] +set menuheight [expr {$menuheight - [winfo y .t]}] destroy .t test winWm-1.1 {TkWmMapWindow} win { @@ -58,7 +58,7 @@ test winWm-1.3 {TkWmMapWindow} win { update toplevel .t2 update - set result [expr [winfo x .t] != [winfo x .t2]] + set result [expr {[winfo x .t] != [winfo x .t2]}] destroy .t .t2 set result } 1 @@ -163,7 +163,7 @@ test winWm-3.1 {ConfigureTopLevel: window geometry propagation} win { update pack .t.b update - set x [expr $x == [winfo x .t.b]] + set x [expr {$x == [winfo x .t.b]}] destroy .t set x } 1 @@ -171,30 +171,35 @@ test winWm-3.1 {ConfigureTopLevel: window geometry propagation} win { test winWm-4.1 {ConfigureTopLevel: menu resizing} win { set result {} toplevel .t - frame .t.f -width 150 -height 50 -bg red + frame .t.f -width 150 -height 50 -background red pack .t.f wm geometry .t -0-0 update set y [winfo y .t] menu .t.m .t.m add command -label foo - .t conf -menu .t.m + .t configure -menu .t.m update - set result [expr $y - [winfo y .t]] + set result [expr {$y - [winfo y .t]}] destroy .t set result -} [expr $menuheight + 1] +} [expr {$menuheight + 1}] +# This test works on 8.0p2 but has not worked on anything since 8.2. +# It would be very strange to have a windows application increase the size +# of the clientarea when a menu wraps so I believe this test to be wrong. +# Original result was {50 50 50} new result may depend on the default menu +# font test winWm-5.1 {UpdateGeometryInfo: menu resizing} win { set result {} toplevel .t - frame .t.f -width 150 -height 50 -bg red + frame .t.f -width 150 -height 50 -background red pack .t.f update set result [winfo height .t] menu .t.m .t.m add command -label foo - .t conf -menu .t.m + .t configure -menu .t.m update lappend result [winfo height .t] .t.m add command -label "thisisreallylong" @@ -202,25 +207,26 @@ test winWm-5.1 {UpdateGeometryInfo: menu resizing} win { update lappend result [winfo height .t] destroy .t + set result -} {50 50 50} +} {50 50 31} test winWm-5.2 {UpdateGeometryInfo: menu resizing} win { set result {} toplevel .t - frame .t.f -width 150 -height 50 -bg red + frame .t.f -width 150 -height 50 -background red pack .t.f - wm geom .t -0-0 + wm geometry .t -0-0 update set y [winfo rooty .t] lappend result [winfo height .t] menu .t.m - .t conf -menu .t.m + .t configure -menu .t.m .t.m add command -label foo .t.m add command -label "thisisreallylong" .t.m add command -label "thisisreallylong" update lappend result [winfo height .t] - lappend result [expr $y - [winfo rooty .t]] + lappend result [expr {$y - [winfo rooty .t]}] destroy .t set result } {50 50 0} |