blob: 0812f710e7daf188f6f6c13960ff3bf3012da3f4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# This file is a Tcl script to test the code in tkEvent.c. It is
# organized in the standard fashion for Tcl tests.
#
# Copyright (c) 1994 The Regents of the University of California.
# Copyright (c) 1994-1995 Sun Microsystems, Inc.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: event.test,v 1.2 1998/09/14 18:23:46 stanton Exp $
if {[info procs test] != "test"} {
source defs
}
foreach i [winfo children .] {
destroy $i
}
wm geometry . {}
raise .
# XXX This test file is woefully incomplete. Right now it only tests
# a few of the procedures in tkEvent.c. Please add more tests whenever
# possible.
test event-1.1 {Tk_HandleEvent procedure, filter events for dead windows} {
button .b -text Test
pack .b
bindtags .b .b
update
bind .b <Destroy> {
lappend x destroy
event generate .b <1>
}
bind .b <1> {
lappend x button
}
set x {}
destroy .b
set x
} {destroy}
|