1 # This file is a Tcl script to test the code in tkEvent.c. It is
2 # organized in the standard fashion for Tcl tests.
4 # Copyright (c) 1994 The Regents of the University of California.
5 # Copyright (c) 1994-1995 Sun Microsystems, Inc.
6 # Copyright (c) 1998-1999 by Scriptics Corporation.
11 if {[lsearch [namespace children] ::tcltest] == -1} {
12 source [file join [pwd] [file dirname [info script]] defs.tcl]
15 foreach i [winfo children .] {
21 # XXX This test file is woefully incomplete. Right now it only tests
22 # a few of the procedures in tkEvent.c. Please add more tests whenever
25 test event-1.1 {Tk_HandleEvent procedure, filter events for dead windows} {
33 event generate .b <ButtonRelease-1>
43 test event-1.2 {event generate <Alt-z>} {
45 catch {unset ::event12result}
49 bind .e <Alt-z> {set ::event12result "1"}
50 focus -force .e ; event generate .e <Alt-z>
55 ::tcltest::cleanupTests