diff options
author | mdejong <mdejong@noemail.net> | 2002-05-24 09:50:11 (GMT) |
---|---|---|
committer | mdejong <mdejong@noemail.net> | 2002-05-24 09:50:11 (GMT) |
commit | 988f2391a48376e23d4f50e455a119682ecefe9c (patch) | |
tree | be1f7fe17390fe84a32e09b3bb937e0a17ddadad /tests/wm.test | |
parent | 18b778a375c1c4f737dd0422453ff334ff1a9922 (diff) | |
download | tk-988f2391a48376e23d4f50e455a119682ecefe9c.zip tk-988f2391a48376e23d4f50e455a119682ecefe9c.tar.gz tk-988f2391a48376e23d4f50e455a119682ecefe9c.tar.bz2 |
* mac/tkMacWm.c (Tk_WmCmd):
* tests/unixWm.test: Move wm transient checks over
to wm.test so they will be run on all systems.
* tests/wm.test: Add tests to check for error when
an iconwindow is passed to the wm transient command.
* unix/tkUnixWm.c (Tk_WmCmd):
* win/tkWinWm.c (Tk_WmCmd): Raise an error if one
of the windows passed to the wm transient command
is an iconwindow for another toplevel.
FossilOrigin-Name: 7e89e7df59b461e3f3179063e3ef13a04505a48c
Diffstat (limited to 'tests/wm.test')
-rw-r--r-- | tests/wm.test | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/tests/wm.test b/tests/wm.test index 7dc6970..0665bcc 100644 --- a/tests/wm.test +++ b/tests/wm.test @@ -7,7 +7,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: wm.test,v 1.4 2002/05/23 19:55:18 mdejong Exp $ +# RCS: @(#) $Id: wm.test,v 1.5 2002/05/24 09:50:11 mdejong Exp $ # This file tests window manager interactions that work across # platforms. Window manager tests that only work on a specific @@ -303,6 +303,48 @@ test wm-stackorder-6.1 {An embedded toplevel does not } {. .real} +test wm-transient-1.1 {usage} { + catch {destroy .t} ; toplevel .t + list [catch {wm transient .t 1 2} msg] $msg +} {1 {wrong # arguments: must be "wm transient window ?master?"}} + +test wm-transient-1.2 {usage} { + catch {destroy .t} ; toplevel .t + list [catch {wm transient .t foo} msg] $msg +} {1 {bad window path name "foo"}} + +test wm-transient-1.3 {usage} { + catch {destroy .t} ; toplevel .t + list [catch {wm transient foo .t} msg] $msg +} {1 {bad window path name "foo"}} + +test wm-transient-1.4 {usage} { + deleteWindows + toplevel .master + toplevel .subject + wm transient .subject .master + list [catch {wm iconify .subject} msg] $msg +} {1 {can't iconify ".subject": it is a transient}} + +test wm-transient-1.5 {usage} { + deleteWindows + toplevel .icon -bg blue + toplevel .top + wm iconwindow .top .icon + toplevel .dummy + list [catch {wm transient .icon .dummy} msg] $msg +} {1 {can't make ".icon" a transient: it is an icon for .top}} + +test wm-transient-1.6 {usage} { + deleteWindows + toplevel .icon -bg blue + toplevel .top + wm iconwindow .top .icon + toplevel .dummy + list [catch {wm transient .dummy .icon} msg] $msg +} {1 {can't make ".icon" a master: it is an icon for .top}} + + # FIXME: # Test delivery of virtual events to the WM. We could check to see |