summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorericm <ericm@noemail.net>2000-04-10 22:43:11 (GMT)
committerericm <ericm@noemail.net>2000-04-10 22:43:11 (GMT)
commitb3405a1220bd9a8d5ac583fe587adaf189b4178e (patch)
tree520393cf07e5b8085d9682bd1f974c1f06db4115 /tests
parent1ec849b7b645e5fd4bc8a426c62fc59b474b4bd8 (diff)
downloadtk-b3405a1220bd9a8d5ac583fe587adaf189b4178e.zip
tk-b3405a1220bd9a8d5ac583fe587adaf189b4178e.tar.gz
tk-b3405a1220bd9a8d5ac583fe587adaf189b4178e.tar.bz2
* tests/event.test: Added test for [event generate $widget
<Alt-z>] [Bug: 4611]. * tests/choosedir.test: Changed "namespace import ::tcltest" to "namespace import -force ::tcltest". * win/tkWinKey.c: * unix/tkUnixKey.c: * mac/tkMacKeyboard.c: Changed InitKeymapInfo to TkpInitKeymapInfo. [Bug: 4611]. * generic/tkStubInit.c: * generic/tkIntDecls.h: Re-gen'd from tkInt.decls. * generic/tkInt.decls: Added TkpInitKeymapInfo to list of function decls. * generic/tkBind.c (HandleEventGenerate): Added code to initialize keymap info if necessary, and to correctly set modifier bits in XEvent structure create to handle [event generate] calls. Previously, the alt/meta bits were not set correctly, so [event generate $widget <Alt-z>] would always fail. [Bug: 4611] FossilOrigin-Name: cd4fc3780f76c12099288725bea9ffac8c1477dd
Diffstat (limited to 'tests')
-rw-r--r--tests/choosedir.test4
-rw-r--r--tests/event.test13
2 files changed, 14 insertions, 3 deletions
diff --git a/tests/choosedir.test b/tests/choosedir.test
index d0fb557..6e03266 100644
--- a/tests/choosedir.test
+++ b/tests/choosedir.test
@@ -5,12 +5,12 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: choosedir.test,v 1.8 2000/03/24 19:38:57 ericm Exp $
+# RCS: @(#) $Id: choosedir.test,v 1.9 2000/04/10 22:43:13 ericm Exp $
#
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
- namespace import ::tcltest::*
+ namespace import -force ::tcltest::*
}
#----------------------------------------------------------------------
diff --git a/tests/event.test b/tests/event.test
index 7b07f58..f1d0450 100644
--- a/tests/event.test
+++ b/tests/event.test
@@ -6,7 +6,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: event.test,v 1.4 1999/12/14 06:53:13 hobbs Exp $
+# RCS: @(#) $Id: event.test,v 1.5 2000/04/10 22:43:13 ericm Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
source [file join [pwd] [file dirname [info script]] defs.tcl]
@@ -40,6 +40,17 @@ test event-1.1 {Tk_HandleEvent procedure, filter events for dead windows} {
set x
} {destroy}
+test event-1.2 {event generate <Alt-z>} {
+ catch {destroy .e}
+ catch {unset ::event12result}
+ set ::event12result 0
+ pack [entry .e]
+ update
+ bind .e <Alt-z> {set ::event12result "1"}
+ focus -force .e ; event generate .e <Alt-z>
+ destroy .e
+ set ::event12result
+} 1
# cleanup
::tcltest::cleanupTests
return