Import Tk 8.5.15 (as of svn r89086)

This commit is contained in:
Zachary Ware
2017-09-04 14:25:47 -05:00
parent 4b29e0458f
commit 27e7dfc7da
883 changed files with 499023 additions and 6 deletions

42
tests/cmds.test Normal file
View File

@@ -0,0 +1,42 @@
# This file is a Tcl script to test the procedures in the file
# tkCmds.c. It is organized in the standard fashion for Tcl tests.
#
# Copyright (c) 1996 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
package require tcltest 2.1
eval tcltest::configure $argv
tcltest::loadTestedCommands
update
test cmds-1.1 {tkwait visibility, argument errors} {
list [catch {tkwait visibility} msg] $msg
} {1 {wrong # args: should be "tkwait variable|visibility|window name"}}
test cmds-1.2 {tkwait visibility, argument errors} {
list [catch {tkwait visibility foo bar} msg] $msg
} {1 {wrong # args: should be "tkwait variable|visibility|window name"}}
test cmds-1.3 {tkwait visibility, argument errors} {
list [catch {tkwait visibility bad_window} msg] $msg
} {1 {bad window path name "bad_window"}}
test cmds-1.4 {tkwait visibility, waiting for window to be mapped} {
button .b -text "Test"
set x init
after 100 {set x delay; place .b -x 0 -y 0}
tkwait visibility .b
destroy .b
set x
} {delay}
test cmds-1.5 {tkwait visibility, window gets deleted} {
frame .f
button .f.b -text "Test"
pack .f.b
set x init
after 100 {set x deleted; destroy .f}
list [catch {tkwait visibility .f.b} msg] $msg $x
} {1 {window ".f.b" was deleted before its visibility changed} deleted}
# cleanup
cleanupTests
return