summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormdejong <mdejong>2002-06-14 07:17:53 (GMT)
committermdejong <mdejong>2002-06-14 07:17:53 (GMT)
commit8c18f8111d03425255bcd1d60b70da5c9ae5f521 (patch)
tree9833a60aa9cc30a18c1210e7283dc652af965645
parent05e959fcd9384aa5fd48d1c117f66461f829e4ee (diff)
downloadtk-8c18f8111d03425255bcd1d60b70da5c9ae5f521.zip
tk-8c18f8111d03425255bcd1d60b70da5c9ae5f521.tar.gz
tk-8c18f8111d03425255bcd1d60b70da5c9ae5f521.tar.bz2
* tests/winfo.test: Add basic tests for winfo ismapped.
-rw-r--r--ChangeLog4
-rw-r--r--tests/winfo.test24
2 files changed, 27 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 5b90c55..2ddbb75 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2002-06-13 Mo DeJong <mdejong@users.sourceforge.net>
+ * tests/winfo.test: Add basic tests for winfo ismapped.
+
+2002-06-13 Mo DeJong <mdejong@users.sourceforge.net>
+
* tests/unixWm.test:
* tests/wm.test: Move wm minsize and wm maxsize
usage tests into the cross platform wm tests.
diff --git a/tests/winfo.test b/tests/winfo.test
index 443ab66..a1344c9 100644
--- a/tests/winfo.test
+++ b/tests/winfo.test
@@ -6,7 +6,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: winfo.test,v 1.5 2000/03/02 23:52:57 hobbs Exp $
+# RCS: @(#) $Id: winfo.test,v 1.6 2002/06/14 07:17:53 mdejong Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
source [file join [pwd] [file dirname [info script]] defs.tcl]
@@ -360,6 +360,28 @@ test winfo-13.4 {[winfo containing] with embedded windows} {
set z
} 0
+test winfo-14.1 {usage} {
+ list [catch {winfo ismapped} msg] $msg
+} {1 {wrong # args: should be "winfo ismapped window"}}
+
+test winfo-14.2 {usage} {
+ list [catch {winfo ismapped . .} msg] $msg
+} {1 {wrong # args: should be "winfo ismapped window"}}
+
+test winfo-14.3 {initially unmapped} {
+ catch {destroy .t}
+ toplevel .t
+ winfo ismapped .t
+} 0
+
+test winfo-14.4 {mapped at idle time} {
+ catch {destroy .t}
+ toplevel .t
+ update idletasks
+ winfo ismapped .t
+} 1
+
+
foreach i [winfo children .] {
catch {destroy $i}
}