summaryrefslogtreecommitdiffstats
path: root/tests/wm.test
diff options
context:
space:
mode:
authormdejong <mdejong>2002-05-24 09:50:11 (GMT)
committermdejong <mdejong>2002-05-24 09:50:11 (GMT)
commit2691c66a5d0511bb50d4f07a1964e95642da32cd (patch)
treebe1f7fe17390fe84a32e09b3bb937e0a17ddadad /tests/wm.test
parent4269e21f438072da010722333d4dc1b22dba8301 (diff)
downloadtk-2691c66a5d0511bb50d4f07a1964e95642da32cd.zip
tk-2691c66a5d0511bb50d4f07a1964e95642da32cd.tar.gz
tk-2691c66a5d0511bb50d4f07a1964e95642da32cd.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.
Diffstat (limited to 'tests/wm.test')
-rw-r--r--tests/wm.test44
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