summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/unixWm.test24
-rw-r--r--tests/winWm.test22
2 files changed, 41 insertions, 5 deletions
diff --git a/tests/unixWm.test b/tests/unixWm.test
index 967e3ff..b9af65a 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.10 1999/12/22 20:01:19 hobbs Exp $
+# RCS: @(#) $Id: unixWm.test,v 1.11 2000/01/12 11:45:36 hobbs Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
source [file join [pwd] [file dirname [info script]] defs.tcl]
@@ -1186,8 +1186,11 @@ test unixWm-34.3 {Tk_WmCmd procedure, "sizefrom" option} {
test unixWm-35.1 {Tk_WmCmd procedure, "state" option} {
list [catch {wm state .t 1} msg] $msg
-} {1 {wrong # arguments: must be "wm state window"}}
+} {1 {bad argument "1": must be normal, iconic or withdrawn}}
test unixWm-35.2 {Tk_WmCmd procedure, "state" option} {
+ list [catch {wm state .t iconic 1} msg] $msg
+} {1 {wrong # arguments: must be "wm state window ?state?"}}
+test unixWm-35.3 {Tk_WmCmd procedure, "state" option} {
set result {}
catch {destroy .t2}
toplevel .t2 -width 120 -height 300
@@ -1204,6 +1207,23 @@ test unixWm-35.2 {Tk_WmCmd procedure, "state" option} {
destroy .t2
set result
} {normal normal withdrawn iconic normal}
+test unixWm-35.4 {Tk_WmCmd procedure, "state" option} {
+ set result {}
+ catch {destroy .t2}
+ toplevel .t2 -width 120 -height 300
+ wm geometry .t2 +0+0
+ lappend result [wm state .t2]
+ update
+ lappend result [wm state .t2]
+ wm state .t2 withdrawn
+ lappend result [wm state .t2]
+ wm state .t2 iconic
+ lappend result [wm state .t2]
+ wm state .t2 normal
+ lappend result [wm state .t2]
+ destroy .t2
+ set result
+} {normal normal withdrawn iconic normal}
test unixWm-36.1 {Tk_WmCmd procedure, "title" option} {
list [catch {wm title .t 1 2} msg] $msg
diff --git a/tests/winWm.test b/tests/winWm.test
index e4275fe..e9c86c1 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.3 1999/04/16 01:51:44 stanton Exp $
+# RCS: @(#) $Id: winWm.test,v 1.4 2000/01/12 11:45:36 hobbs Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
source [file join [pwd] [file dirname [info script]] defs.tcl]
@@ -117,7 +117,24 @@ test winWm-2.2 {TkpWmSetState} {pcOnly} {
destroy .t
set result
} {normal withdrawn iconic normal}
-test winWm-2.3 {TkpWmSetState} {pcOnly} {
+test winWm-2.2 {TkpWmSetState} {pcOnly} {
+ toplevel .t
+ wm geometry .t 150x50+10+10
+ update
+ set result [wm state .t]
+ wm state .t withdrawn
+ update
+ lappend result [wm state .t]
+ wm state .t iconic
+ update
+ lappend result [wm state .t]
+ wm state .t normal
+ update
+ lappend result [wm state .t]
+ destroy .t
+ set result
+} {normal withdrawn iconic normal}
+test winWm-2.4 {TkpWmSetState} {pcOnly} {
set result {}
toplevel .t
wm geometry .t 150x50+10+10
@@ -136,7 +153,6 @@ test winWm-2.3 {TkpWmSetState} {pcOnly} {
set result
} {{normal 150x50+10+10} {iconic 150x50+10+10} {iconic 150x50+10+10} {normal 200x50+10+10}}
-
test winWm-3.1 {ConfigureTopLevel: window geometry propagation} {pcOnly} {
toplevel .t
wm geometry .t +0+0