diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-03-30 09:58:26 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-03-30 09:58:26 (GMT) |
commit | d4e2fda1837c59fa8cf3499154cd7a005e6bb945 (patch) | |
tree | 5afd6eb3b6cb74f778a38d2769c8856d96b62c8f /tests/menu.test | |
parent | 6690b12e0d44f29ed6d22f886d370adba7368924 (diff) | |
parent | 818721f59ac0739b02c113eec623a48669b85a1b (diff) | |
download | tk-d4e2fda1837c59fa8cf3499154cd7a005e6bb945.zip tk-d4e2fda1837c59fa8cf3499154cd7a005e6bb945.tar.gz tk-d4e2fda1837c59fa8cf3499154cd7a005e6bb945.tar.bz2 |
Merge 8.7
Diffstat (limited to 'tests/menu.test')
-rw-r--r-- | tests/menu.test | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/tests/menu.test b/tests/menu.test index 756c4ed..4f28fbb 100644 --- a/tests/menu.test +++ b/tests/menu.test @@ -3357,6 +3357,58 @@ test menu-20.11 {CloneMenu} -setup { menu .m2 .m1 clone .m2 } -returnCodes error -result {window name "m2" already exists in parent} +test menu-20.12 {CloneMenu - copied bindings on empty menu} -setup { + deleteWindows + set x {} +} -body { + menu .m1 -tearoff 0 + bind .m1 <<Test>> {append x <<Test>>} + .m1 clone .m2 tearoff + .m2 post 100 100 + event generate .m2 <<Test>> + return $x +} -result {<<Test>>} +test menu-20.13 {CloneMenu - copied bindings on non-empty menu} -setup { + deleteWindows + set x {} +} -body { + menu .m1 -tearoff 1 + bind .m1 <<Test>> {append x <<Test>>} + .m1 clone .m2 tearoff + .m2 post 100 100 + event generate .m2 <<Test>> + return $x +} -result {<<Test>>} +test menu-20.14 {CloneMenu - new binding on empty menu} -setup { + deleteWindows + set x {} +} -body { + menu .m1 -tearoff 0 + .m1 clone .m2 tearoff + .m2 post 100 100 + bind .m1 <<Test>> {append x <<Test>>} + event generate .m2 <<Test>> + return $x +} -result {<<Test>>} +test menu-20.15 {CloneMenu - new binding on non-empty menu} -setup { + deleteWindows + set x {} +} -body { + menu .m1 -tearoff 1 + .m1 clone .m2 tearoff + .m2 post 100 100 + bind .m1 <<Test>> {append x <<Test>>} + event generate .m2 <<Test>> + return $x +} -result {<<Test>>} +test menu-20.16 {CloneMenu - bindtags} -setup { + deleteWindows +} -body { + menu .m1 + bindtags .m1 [linsert [bindtags .m1] 1 .m1.sub1] + .m1 clone .m2 + bindtags .m2 +} -result {.m2 .m1 .m1.sub1 Menu all} test menu-21.1 {MenuDoYPosition} -setup { deleteWindows |