summaryrefslogtreecommitdiffstats
path: root/tests/menu.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/menu.test')
-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}