diff options
author | dgp@users.sourceforge.net <dgp> | 2002-07-13 20:28:35 (GMT) |
---|---|---|
committer | dgp@users.sourceforge.net <dgp> | 2002-07-13 20:28:35 (GMT) |
commit | e03a6d8c8daca0485139c9a7edc9008565c2e000 (patch) | |
tree | 83ce372d1ae9d46d27acc5638739bddcbc8e6ba6 /tests/winfo.test | |
parent | 60df07e990cbc0441a2fcf7783ccbfae69a82aa8 (diff) | |
download | tk-e03a6d8c8daca0485139c9a7edc9008565c2e000.zip tk-e03a6d8c8daca0485139c9a7edc9008565c2e000.tar.gz tk-e03a6d8c8daca0485139c9a7edc9008565c2e000.tar.bz2 |
* Converted more files to tcltest and factored out common code.
Diffstat (limited to 'tests/winfo.test')
-rw-r--r-- | tests/winfo.test | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/tests/winfo.test b/tests/winfo.test index 1916cfa..89e6928 100644 --- a/tests/winfo.test +++ b/tests/winfo.test @@ -6,18 +6,14 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: winfo.test,v 1.7 2002/07/12 13:41:01 dgp Exp $ +# RCS: @(#) $Id: winfo.test,v 1.8 2002/07/13 20:28:36 dgp Exp $ package require tcltest 2.1 -namespace import -force tcltest::test -namespace import -force tcltest::testConstraint -eval tcltest::configure $argv - -foreach i [winfo children .] { - catch {destroy $i} -} -wm geometry . {} -raise . +namespace import -force tcltest::configure +namespace import -force tcltest::testsDirectory +configure -testdir [file join [pwd] [file dirname [info script]]] +configure -loadfile [file join [testsDirectory] constraints.tcl] +tcltest::loadTestedCommands # Some tests require the testwrapper command testConstraint testwrapper [llength [info commands testwrapper]] @@ -247,7 +243,7 @@ test winfo-9.5 {"winfo viewable" command} { list [winfo viewable .f1] [winfo viewable .f1.f2] } {1 1} test winfo-9.6 {"winfo viewable" command} { - eval destroy [winfo child .] + deleteWindows frame .f1 -width 100 -height 100 -relief raised -bd 2 frame .f1.f2 -width 50 -height 50 -relief raised -bd 2 place .f1.f2 -x 0 -y 0 @@ -255,7 +251,7 @@ test winfo-9.6 {"winfo viewable" command} { list [winfo viewable .f1] [winfo viewable .f1.f2] } {0 0} test winfo-9.7 {"winfo viewable" command} { - eval destroy [winfo child .] + deleteWindows frame .f1 -width 100 -height 100 -relief raised -bd 2 place .f1 -x 0 -y 0 frame .f1.f2 -width 50 -height 50 -relief raised -bd 2 @@ -265,7 +261,7 @@ test winfo-9.7 {"winfo viewable" command} { list [winfo viewable .f1] [winfo viewable .f1.f2] } {0 0} wm deiconify . -eval destroy [winfo child .] +deleteWindows test winfo-10.1 {"winfo visualid" command} { list [catch {winfo visualid} msg] $msg @@ -329,9 +325,7 @@ test winfo-13.2 {destroying embedded toplevel} { expr [winfo exists .emb.b] || [winfo exists .con] } 0 -foreach i [winfo children .] { - destroy $i -} +deleteWindows test winfo-13.3 {destroying container window} { MakeEmbed @@ -343,9 +337,7 @@ test winfo-13.3 {destroying container window} { set z } 0 -foreach i [winfo children .] { - destroy $i -} +deleteWindows test winfo-13.4 {[winfo containing] with embedded windows} { MakeEmbed @@ -381,11 +373,7 @@ test winfo-14.4 {mapped at idle time} { winfo ismapped .t } 1 - -foreach i [winfo children .] { - catch {destroy $i} -} - +deleteWindows # cleanup ::tcltest::cleanupTests return |