diff --git a/tests/wm.test b/tests/wm.test index c09ad816a..7913db315 100644 --- a/tests/wm.test +++ b/tests/wm.test @@ -553,7 +553,7 @@ test wm-deiconify-1.6 {usage} -constraints !win -setup { deleteWindows test wm-deiconify-2.1 {a window that has never been mapped\ - should not be mapped by a call to deiconify} -body { + should not be mapped by a call to deiconify} -body { toplevel .t wm deiconify .t winfo ismapped .t @@ -561,7 +561,7 @@ test wm-deiconify-2.1 {a window that has never been mapped\ deleteWindows } -result 0 test wm-deiconify-2.2 {a window that has already been\ - mapped should be mapped by deiconify} -body { + mapped should be mapped by deiconify} -body { toplevel .t update idletasks wm withdraw .t @@ -571,8 +571,8 @@ test wm-deiconify-2.2 {a window that has already been\ deleteWindows } -result 1 test wm-deiconify-2.3 {geometry for an unmapped window\ - should not be calculated by a call to deiconify,\ - it should be done at idle time} -setup { + should not be calculated by a call to deiconify,\ + it should be done at idle time} -setup { set results {} } -body { toplevel .t -width 200 -height 200 @@ -581,13 +581,13 @@ test wm-deiconify-2.3 {geometry for an unmapped window\ lappend results [wm geometry .t] update idletasks lappend results [lindex [split \ - [wm geometry .t] +] 0] + [wm geometry .t] +] 0] } -cleanup { deleteWindows } -result {1x1+0+0 1x1+0+0 200x200} test wm-deiconify-2.4 {invoking destroy after a deiconify\ - should not result in a crash because of a callback\ - set on the toplevel} -body { + should not result in a crash because of a callback\ + set on the toplevel} -body { toplevel .t wm withdraw .t wm deiconify .t @@ -944,6 +944,8 @@ test wm-iconwindow-1.5 {usage} -setup { } -result {.icon is already an icon for .t2} test wm-iconwindow-2.1 {setting and reading values} -setup { + # without this macOS crashes for unknown reasons + wm iconwindow .t {} destroy .icon set result {} } -body { @@ -996,7 +998,7 @@ test wm-maxsize-1.7 {maxsize must be <= screen size} -setup { destroy .t test wm-maxsize-2.1 {setting the maxsize to a value smaller\ - than the current size will resize a toplevel} -body { + than the current size will resize a toplevel} -body { toplevel .t -width 300 -height 300 update wm maxsize .t 200 150 @@ -1007,7 +1009,7 @@ test wm-maxsize-2.1 {setting the maxsize to a value smaller\ destroy .t } -result {200 150} test wm-maxsize-2.2 {setting the maxsize to a value smaller\ - than the current size will resize a gridded toplevel} -body { + than the current size will resize a gridded toplevel} -body { toplevel .t wm grid .t 0 0 50 50 wm geometry .t 6x6 @@ -1020,7 +1022,7 @@ test wm-maxsize-2.2 {setting the maxsize to a value smaller\ destroy .t } -result {4 3} test wm-maxsize-2.3 {attempting to resize to a value\ - bigger than the current maxsize will set it to the max size} -body { + bigger than the current maxsize will set it to the max size} -body { toplevel .t -width 200 -height 200 wm maxsize .t 300 250 update @@ -1084,7 +1086,7 @@ test wm-minsize-1.6 {usage} -setup { } -result {300 200} test wm-minsize-2.1 {setting the minsize to a value larger\ - than the current size will resize a toplevel} -body { + than the current size will resize a toplevel} -body { toplevel .t -width 200 -height 200 update wm minsize .t 400 300 @@ -1095,7 +1097,7 @@ test wm-minsize-2.1 {setting the minsize to a value larger\ destroy .t } -result {400 300} test wm-minsize-2.2 {setting the minsize to a value larger\ - than the current size will resize a gridded toplevel} -body { + than the current size will resize a gridded toplevel} -body { toplevel .t wm grid .t 1 1 50 50 wm geom .t 4x4 @@ -1108,7 +1110,7 @@ test wm-minsize-2.2 {setting the minsize to a value larger\ destroy .t } -result {8 8} test wm-minsize-2.3 {attempting to resize to a value\ - smaller than the current minsize will set it to the minsize} -body { + smaller than the current minsize will set it to the minsize} -body { toplevel .t -width 400 -height 400 wm minsize .t 300 300 update @@ -1362,18 +1364,24 @@ test wm-stackorder-2.2 {stacking order} -body { destroy .t } -result {.t .} test wm-stackorder-2.3 {stacking order} -body { + set res {} toplevel .t tkwait visibility .t + raiseDelay toplevel .t2 tkwait visibility .t2 + raiseDelay + lappend res [wm stackorder .] raise . raiseDelay + lappend res [wm stackorder .] raise .t2 raiseDelay - wm stackorder . + lappend res [wm stackorder .] + set res } -cleanup { destroy .t .t2 -} -result {.t . .t2} +} -result {. .t .t2} {.t .t2 .} {.t . .t2} test wm-stackorder-2.4 {stacking order} -body { toplevel .t ; update toplevel .t2 ; update @@ -1562,7 +1570,7 @@ test wm-stackorder-5.2.1 {A normal toplevel can be raised above an \ destroy .t } -result 1 test wm-stackorder-5.3 {An overrideredirect window\ - can be explicitly lowered} -body { + can be explicitly lowered} -body { toplevel .t wm overrideredirect .t 1 tkwait visibility .t @@ -1695,7 +1703,7 @@ test wm-transient-2.2 {first toplevel parent of non-toplevel container window is } -result {.top} test wm-transient-3.1 {transient toplevel is withdrawn - when mapped if toplevel is withdrawn} -body { + when mapped if toplevel is withdrawn} -body { toplevel .top wm withdraw .top update @@ -1707,7 +1715,7 @@ test wm-transient-3.1 {transient toplevel is withdrawn deleteWindows } -result {withdrawn 0} test wm-transient-3.2 {already mapped transient toplevel - takes on withdrawn state of toplevel} -body { + takes on withdrawn state of toplevel} -body { toplevel .top wm withdraw .top update @@ -1720,7 +1728,7 @@ test wm-transient-3.2 {already mapped transient toplevel deleteWindows } -result {withdrawn 0} test wm-transient-3.3 {withdraw/deiconify on the toplevel - also does a withdraw/deiconify on the transient} -setup { + also does a withdraw/deiconify on the transient} -setup { set results [list] } -body { toplevel .top @@ -1738,7 +1746,7 @@ test wm-transient-3.3 {withdraw/deiconify on the toplevel } -result {withdrawn 0 normal 1} test wm-transient-4.1 {transient toplevel is withdrawn - when mapped if toplevel is iconic} -constraints {failsOnUbuntu failsOnXQuarz} -body { + when mapped if toplevel is iconic} -constraints {failsOnUbuntu failsOnXQuarz} -body { toplevel .top wm iconify .top update @@ -1750,7 +1758,7 @@ test wm-transient-4.1 {transient toplevel is withdrawn deleteWindows } -result {withdrawn 0} test wm-transient-4.2 {already mapped transient toplevel - is withdrawn if toplevel is iconic} -constraints {failsOnUbuntu failsOnXQuarz} -body { + is withdrawn if toplevel is iconic} -constraints {failsOnUbuntu failsOnXQuarz} -body { toplevel .top raiseDelay wm iconify .top @@ -1764,7 +1772,7 @@ test wm-transient-4.2 {already mapped transient toplevel deleteWindows } -result {withdrawn 0} test wm-transient-4.3 {iconify/deiconify on the toplevel - does a withdraw/deiconify on the transient} -constraints {failsOnUbuntu failsOnXQuarz} -setup { + does a withdraw/deiconify on the transient} -constraints {failsOnUbuntu failsOnXQuarz} -setup { set results [list] } -body { toplevel .top @@ -1782,7 +1790,7 @@ test wm-transient-4.3 {iconify/deiconify on the toplevel } -result {withdrawn 0 normal 1} test wm-transient-5.1 {an error during transient command should not - cause the map/unmap binding to be deleted} -setup { + cause the map/unmap binding to be deleted} -setup { set results [list] } -body { toplevel .top @@ -1801,7 +1809,7 @@ test wm-transient-5.1 {an error during transient command should not deleteWindows } -result {1 withdrawn normal} test wm-transient-5.2 {remove transient property when toplevel - is destroyed} -body { + is destroyed} -body { toplevel .top toplevel .subject wm transient .subject .top @@ -1813,7 +1821,7 @@ test wm-transient-5.2 {remove transient property when toplevel deleteWindows } -result {} test wm-transient-5.3 {remove transient property from window - that had never been mapped when toplevel is destroyed} -body { + that had never been mapped when toplevel is destroyed} -body { toplevel .top toplevel .subject wm transient .subject .top @@ -1824,7 +1832,7 @@ test wm-transient-5.3 {remove transient property from window } -result {} test wm-transient-6.1 {a withdrawn transient does not track - state changes in the toplevel} -body { + state changes in the toplevel} -body { toplevel .top toplevel .subject update @@ -1839,7 +1847,7 @@ test wm-transient-6.1 {a withdrawn transient does not track deleteWindows } -result {withdrawn} test wm-transient-6.2 {a withdrawn transient does not track - state changes in the toplevel} -setup { + state changes in the toplevel} -setup { set results [list] } -body { toplevel .top @@ -1864,7 +1872,7 @@ test wm-transient-6.2 {a withdrawn transient does not track deleteWindows } -result {withdrawn normal withdrawn normal} test wm-transient-6.3 {a withdrawn transient does not track - state changes in the toplevel} -body { + state changes in the toplevel} -body { toplevel .top toplevel .subject update @@ -1921,7 +1929,7 @@ test wm-transient-7.4 {Reassign transient, destroy new toplevel} -body { toplevel .transient wm transient .transient .t1 wm transient .transient .t2 - destroy .t2 ;# caused panic in 8.4b1 + destroy .t2 ;# caused panic in 8.4b1 destroy .t1 destroy .transient } -cleanup { @@ -1934,7 +1942,7 @@ test wm-transient-7.5 {Reassign transient, destroy transient} -body { wm transient .transient .t1 wm transient .transient .t2 destroy .transient - destroy .t2 ;# caused panic in 8.4b1 + destroy .t2 ;# caused panic in 8.4b1 destroy .t1 ;# so did this } -cleanup { deleteWindows