summaryrefslogtreecommitdiffstats
path: root/tests/menu.test
diff options
context:
space:
mode:
authorsbron <sbron@tclcode.com>2023-03-20 10:35:49 (GMT)
committersbron <sbron@tclcode.com>2023-03-20 10:35:49 (GMT)
commitd506153e3da3be7340e7242424d74a23342d8428 (patch)
treed2523bc55ed644904f2cc738ba3b211e8bc9b18c /tests/menu.test
parentc9fa73560e09fd8645deaee8706d15a6f0d8c80c (diff)
downloadtk-d506153e3da3be7340e7242424d74a23342d8428.zip
tk-d506153e3da3be7340e7242424d74a23342d8428.tar.gz
tk-d506153e3da3be7340e7242424d74a23342d8428.tar.bz2
Fix error message formatting and add a test for the error scenario.
Diffstat (limited to 'tests/menu.test')
-rw-r--r--tests/menu.test10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/menu.test b/tests/menu.test
index e330417..a114269 100644
--- a/tests/menu.test
+++ b/tests/menu.test
@@ -4134,6 +4134,16 @@ test menu-40.12 {identifiers - delete by id} -setup {
} -cleanup {
destroy .m
} -result {e001 e002 cmd9}
+test menu-40.12 {identifiers - duplicate} -setup {
+ destroy .m
+} -body {
+ menu .m
+ .m add command foo -label 1
+ .m add command bar -label 2
+ .m add command foo -label 3
+} -cleanup {
+ destroy .m
+} -returnCodes error -result {entry "foo" already exists}
# cleanup
imageFinish