summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoruid38226 <uid38226>2002-01-31 21:05:27 (GMT)
committeruid38226 <uid38226>2002-01-31 21:05:27 (GMT)
commite51b469b07e385f8d952e1e83fbbb98be5a71a79 (patch)
tree2ee8b3870e91409b4a2075e48216b96a0c9d60e8 /tests
parent9ba6d7b21fed9e61a8e0bf74932aea176849a7f7 (diff)
downloadtk-e51b469b07e385f8d952e1e83fbbb98be5a71a79.zip
tk-e51b469b07e385f8d952e1e83fbbb98be5a71a79.tar.gz
tk-e51b469b07e385f8d952e1e83fbbb98be5a71a79.tar.bz2
Correct and test for logic error when cloning menus. Bug 508988
Diffstat (limited to 'tests')
-rw-r--r--tests/menu.test21
1 files changed, 20 insertions, 1 deletions
diff --git a/tests/menu.test b/tests/menu.test
index 0699e7b..701a3af 100644
--- a/tests/menu.test
+++ b/tests/menu.test
@@ -5,7 +5,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: menu.test,v 1.10 2001/11/17 22:35:50 hobbs Exp $
+# RCS: @(#) $Id: menu.test,v 1.11 2002/01/31 21:05:27 uid38226 Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
source [file join [pwd] [file dirname [info script]] defs.tcl]
@@ -913,6 +913,25 @@ test menu-3.67 {MenuWidgetCmd procedure, bad option} {
menu .m1
list [catch {.m1 foo} msg] $msg [destroy .m1]
} {1 {bad option "foo": must be activate, add, cget, clone, configure, delete, entrycget, entryconfigure, index, insert, invoke, post, postcascade, type, unpost, or yposition} {}}
+test menu-3.68 {MenuWidgetCmd procedure, fix for bug#508988} {
+ set t .t
+ set m1 .t.m1
+ set c1 .t.c1
+ set c2 .t.c2
+ toplevel .t
+ menu $m1 -tearoff 1
+ menu $c1 -tearoff 1
+ $c1 add command -label c1
+ menu $c2 -tearoff 1
+ $c2 add command -label c2
+ $m1 add cascade -label c1 -menu $c1
+ $t configure -menu $m1
+ $m1 entryconfigure 1 -menu $c2 -label c2
+ $t configure -menu ""
+ set l [list [winfo exists $c1] [winfo exists $c2]]
+ destroy $t;
+ set l;
+} {1 1}
test menu-4.1 {TkInvokeMenu: disabled} {
catch {destroy .m1}