summaryrefslogtreecommitdiffstats
path: root/tests/event.test
diff options
context:
space:
mode:
authorrjohnson <rjohnson@noemail.net>1998-04-01 09:51:45 (GMT)
committerrjohnson <rjohnson@noemail.net>1998-04-01 09:51:45 (GMT)
commit9c5b7f2b7e472536ed2e7c915ead05e2aa264182 (patch)
tree8fb30cb152c4dc191be47fa043d2e6f5ea38c7ba /tests/event.test
parent1d0efcbe267f2c0eb73869862522fb20fb2d63ca (diff)
downloadtk-9c5b7f2b7e472536ed2e7c915ead05e2aa264182.zip
tk-9c5b7f2b7e472536ed2e7c915ead05e2aa264182.tar.gz
tk-9c5b7f2b7e472536ed2e7c915ead05e2aa264182.tar.bz2
Initial revision
FossilOrigin-Name: 2bf55ca9aa942b581137b9f474da5ad9c1480de4
Diffstat (limited to 'tests/event.test')
-rw-r--r--tests/event.test41
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/event.test b/tests/event.test
new file mode 100644
index 0000000..a8ab3de
--- /dev/null
+++ b/tests/event.test
@@ -0,0 +1,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.
+#
+# SCCS: @(#) event.test 1.6 96/09/12 09:25:44
+
+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}