summaryrefslogtreecommitdiffstats
path: root/tests/menu.test
diff options
context:
space:
mode:
authordkf <dkf@noemail.net>2010-01-05 09:44:52 (GMT)
committerdkf <dkf@noemail.net>2010-01-05 09:44:52 (GMT)
commit7439413fe15132586cd2791c23208a2cdf8e9bfc (patch)
tree6614253727e7042fe22d834df061463060456259 /tests/menu.test
parenteaac851aacbc3f7532867b8f112e20cc605c77e7 (diff)
downloadtk-7439413fe15132586cd2791c23208a2cdf8e9bfc.zip
tk-7439413fe15132586cd2791c23208a2cdf8e9bfc.tar.gz
tk-7439413fe15132586cd2791c23208a2cdf8e9bfc.tar.bz2
[Bug 220950]: Don't delete the last menu entry when it is obvious that is not
what was intended. FossilOrigin-Name: 11a6c5733ef259aa96069e13bb0a76a4ed15aedc
Diffstat (limited to 'tests/menu.test')
-rw-r--r--tests/menu.test13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/menu.test b/tests/menu.test
index a34171c..0fd4113 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.20.4.2 2010/01/03 00:42:02 patthoyts Exp $
+# RCS: @(#) $Id: menu.test,v 1.20.4.3 2010/01/05 09:44:54 dkf Exp $
package require tcltest 2.1
eval tcltest::configure $argv
@@ -681,6 +681,17 @@ test menu-3.29 {MenuWidgetCmd procedure, "delete" option} {
.m1 activate 3
list [catch {.m1 delete 1} msg] $msg [destroy .m1]
} {0 {} {}}
+test menu-3.29+1 {MenuWidgetCmd, "delete", Bug 220950} -setup {
+ destroy .m1
+} -body {
+ menu .m1
+ .m1 add command -label "bogus"
+ .m1 add command -label "ok"
+ .m1 delete 10 20
+ .m1 entrycget last -label
+} -cleanup {
+ destroy .m1
+} -result ok
test menu-3.30 {MenuWidgetCmd procedure, "entrycget" option} {
catch {destroy .m1}
menu .m1