summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authormdejong <mdejong>2002-05-24 09:50:11 (GMT)
committermdejong <mdejong>2002-05-24 09:50:11 (GMT)
commitf9247ee35c133bb545cb53b9cea7f7a9f3a6fd8c (patch)
treebe1f7fe17390fe84a32e09b3bb937e0a17ddadad /tests
parent7232648b41b68bdd036d35aed2b081ba08809e55 (diff)
downloadtk-f9247ee35c133bb545cb53b9cea7f7a9f3a6fd8c.zip
tk-f9247ee35c133bb545cb53b9cea7f7a9f3a6fd8c.tar.gz
tk-f9247ee35c133bb545cb53b9cea7f7a9f3a6fd8c.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')
-rw-r--r--tests/unixWm.test8
-rw-r--r--tests/wm.test44
2 files changed, 44 insertions, 8 deletions
diff --git a/tests/unixWm.test b/tests/unixWm.test
index 2cf9ad3..ae675a4 100644
--- a/tests/unixWm.test
+++ b/tests/unixWm.test
@@ -7,7 +7,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: unixWm.test,v 1.14 2001/12/04 03:07:43 mdejong Exp $
+# RCS: @(#) $Id: unixWm.test,v 1.15 2002/05/24 09:50:11 mdejong Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
source [file join [pwd] [file dirname [info script]] defs.tcl]
@@ -1262,12 +1262,6 @@ test unixWm-36.2 {Tk_WmCmd procedure, "title" option} {unixOnly} {
lappend result [wm title .t] [testprop [testwrapper .t] WM_NAME]
} {t t {Test window} {Test window}}
-test unixWm-37.1 {Tk_WmCmd procedure, "transient" option} {
- list [catch {wm transient .t 1 2} msg] $msg
-} {1 {wrong # arguments: must be "wm transient window ?master?"}}
-test unixWm-37.2 {Tk_WmCmd procedure, "transient" option} {
- list [catch {wm transient .t foo} msg] $msg
-} {1 {bad window path name "foo"}}
test unixWm-37.3 {Tk_WmCmd procedure, "transient" option} {unixOnly} {
set result {}
catch {destroy .t2}
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