diff options
Diffstat (limited to 'tests/menu.test')
-rw-r--r-- | tests/menu.test | 597 |
1 files changed, 298 insertions, 299 deletions
diff --git a/tests/menu.test b/tests/menu.test index 7589aea..ec78087 100644 --- a/tests/menu.test +++ b/tests/menu.test @@ -29,7 +29,7 @@ test menu-1.4 {Tk_MenuCmd procedure} -body { destroy .m1 menu .m1 } -cleanup { - deleteWindows + deleteWindows } -result {.m1} test menu-1.5 {Tk_MenuCmd - creating menubar} -setup { destroy .m1 @@ -38,19 +38,19 @@ test menu-1.5 {Tk_MenuCmd - creating menubar} -setup { .m1 add cascade -label Test -menu "" list [. configure -menu .m1] [. configure -menu ""] } -cleanup { - deleteWindows + deleteWindows } -result {{} {}} test menu-1.6 {Tk_MenuCmd procedure menu ref no cascade} -setup { - deleteWindows + deleteWindows } -body { toplevel .t2 -menu .m1 wm geometry .t2 +0+0 menu .m1 } -cleanup { - deleteWindows + deleteWindows } -result {.m1} test menu-1.7 {Tk_MenuCmd procedure one clone cascade} -setup { - deleteWindows + deleteWindows } -body { toplevel .t2 -menu .m1 wm geometry .t2 +0+0 @@ -58,10 +58,10 @@ test menu-1.7 {Tk_MenuCmd procedure one clone cascade} -setup { .m1 add cascade -menu .m2 menu .m2 } -cleanup { - deleteWindows + deleteWindows } -result {.m2} test menu-1.8 {Tk_MenuCmd procedure two clone cascades} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add cascade -menu .m2 @@ -71,10 +71,10 @@ test menu-1.8 {Tk_MenuCmd procedure two clone cascades} -setup { wm geometry .t3 +0+0 menu .m2 } -cleanup { - deleteWindows + deleteWindows } -result {.m2} test menu-1.9 {Tk_MenuCmd procedure two clone cascades different order} -setup { - deleteWindows + deleteWindows } -body { toplevel .t2 -menu .m1 wm geometry .t2 +0+0 @@ -84,10 +84,10 @@ test menu-1.9 {Tk_MenuCmd procedure two clone cascades different order} -setup { wm geometry .t3 +0+0 list [menu .m2] } -cleanup { - deleteWindows + deleteWindows } -result {.m2} test menu-1.10 {Tk_MenuCmd procedure two clone cascades menus last} -setup { - deleteWindows + deleteWindows } -body { toplevel .t2 -menu .m1 wm geometry .t2 +0+0 @@ -97,10 +97,10 @@ test menu-1.10 {Tk_MenuCmd procedure two clone cascades menus last} -setup { .m1 add cascade -menu .m2 list [menu .m2] } -cleanup { - deleteWindows + deleteWindows } -result {.m2} test menu-1.11 {Tk_MenuCmd procedure three clones cascades} -setup { - deleteWindows + deleteWindows } -body { toplevel .t2 -menu .m1 wm geometry .t2 +0+0 @@ -112,19 +112,19 @@ test menu-1.11 {Tk_MenuCmd procedure three clones cascades} -setup { .m1 add cascade -menu .m2 list [menu .m2] } -cleanup { - deleteWindows + deleteWindows } -result {.m2} test menu-1.12 {Tk_MenuCmd procedure} -setup { - deleteWindows + deleteWindows } -body { toplevel .t2 -menu .m1 wm geometry .t2 +0+0 list [menu .m1] } -cleanup { - deleteWindows + deleteWindows } -result {.m1} test menu-1.13 {Tk_MenuCmd procedure} -setup { - deleteWindows + deleteWindows } -body { toplevel .t2 -menu .m1 wm geometry .t2 +0+0 @@ -132,10 +132,10 @@ test menu-1.13 {Tk_MenuCmd procedure} -setup { wm geometry .t3 +0+0 list [menu .m1] } -cleanup { - deleteWindows + deleteWindows } -result {.m1} test menu-1.14 {Tk_MenuCmd procedure} -setup { - deleteWindows + deleteWindows } -body { toplevel .t2 -menu .m1 wm geometry .t2 +0+0 @@ -145,7 +145,7 @@ test menu-1.14 {Tk_MenuCmd procedure} -setup { wm geometry .t4 +0+0 list [menu .m1] } -cleanup { - deleteWindows + deleteWindows } -result {.m1} # Used for 2.1 - 2.30 tests @@ -262,11 +262,11 @@ test menu-2.27 {configuration options -takefocus {any string}} -body { test menu-2.28 {configuration options -tearoff 0} -body { .m1 configure -tearoff 0 .m1 cget -tearoff -} -result {0} +} -result 0 test menu-2.29 {configuration options -tearoff 1} -body { .m1 configure -tearoff 1 .m1 cget -tearoff -} -result {1} +} -result 1 test menu-2.30 {configuration options -tearoffcommand {any old string}} -body { .m1 configure -tearoffcommand {any old string} .m1 cget -tearoffcommand @@ -537,12 +537,12 @@ test menu-2.85 {entry configuration options 0 -columnbreak 1 tearoff} -body { test menu-2.86 {entry configuration options 1 -columnbreak 1 command} -body { .m1 entryconfigure 1 -columnbreak 1 lindex [.m1 entryconfigure 1 -columnbreak] 4 -} -result {1} +} -result 1 test menu-2.87 {entry configuration options 2 -columnbreak 1 cascade} -body { .m1 entryconfigure 2 -columnbreak 1 lindex [.m1 entryconfigure 2 -columnbreak] 4 -} -result {1} +} -result 1 test menu-2.88 {entry configuration options 3 -columnbreak 1 separator} -body { .m1 entryconfigure 3 -columnbreak 1 @@ -551,12 +551,12 @@ test menu-2.88 {entry configuration options 3 -columnbreak 1 separator} -body { test menu-2.89 {entry configuration options 4 -columnbreak 1 checkbutton} -body { .m1 entryconfigure 4 -columnbreak 1 lindex [.m1 entryconfigure 4 -columnbreak] 4 -} -result {1} +} -result 1 test menu-2.90 {entry configuration options 5 -columnbreak 1 radiobutton} -body { .m1 entryconfigure 5 -columnbreak 1 lindex [.m1 entryconfigure 5 -columnbreak] 4 -} -result {1} +} -result 1 test menu-2.91 {entry configuration options 0 -command beep tearoff} -body { .m1 entryconfigure 0 -command beep @@ -821,12 +821,12 @@ test menu-2.142 {entry configuration options 3 -indicatoron 1 separator} -body { test menu-2.143 {entry configuration options 4 -indicatoron 1 checkbutton} -body { .m1 entryconfigure 4 -indicatoron 1 lindex [.m1 entryconfigure 4 -indicatoron] 4 -} -result {1} +} -result 1 test menu-2.144 {entry configuration options 5 -indicatoron 1 radiobutton} -body { .m1 entryconfigure 5 -indicatoron 1 lindex [.m1 entryconfigure 5 -indicatoron] 4 -} -result {1} +} -result 1 test menu-2.145 {entry configuration options 0 -label test tearoff} -body { .m1 entryconfigure 0 -label test @@ -1164,12 +1164,12 @@ test menu-2.217 {entry configuration options 0 -underline 0 tearoff} -body { test menu-2.218 {entry configuration options 1 -underline 0 command} -body { .m1 entryconfigure 1 -underline 0 lindex [.m1 entryconfigure 1 -underline] 4 -} -result {0} +} -result 0 test menu-2.219 {entry configuration options 2 -underline 0 cascade} -body { .m1 entryconfigure 2 -underline 0 lindex [.m1 entryconfigure 2 -underline] 4 -} -result {0} +} -result 0 test menu-2.220 {entry configuration options 3 -underline 0 separator} -body { .m1 entryconfigure 3 -underline 0 @@ -1178,12 +1178,12 @@ test menu-2.220 {entry configuration options 3 -underline 0 separator} -body { test menu-2.221 {entry configuration options 4 -underline 0 checkbutton} -body { .m1 entryconfigure 4 -underline 0 lindex [.m1 entryconfigure 4 -underline] 4 -} -result {0} +} -result 0 test menu-2.222 {entry configuration options 5 -underline 0 radiobutton} -body { .m1 entryconfigure 5 -underline 0 lindex [.m1 entryconfigure 5 -underline] 4 -} -result {0} +} -result 0 test menu-2.223 {entry configuration options 0 -underline 3p tearoff} -body { .m1 entryconfigure 0 -underline 3p @@ -1359,7 +1359,7 @@ test menu-3.18 {MenuWidgetCmd procedure, "configure" option} -setup { llength [.m1 configure] } -cleanup { destroy .m1 -} -result {20} +} -result 20 test menu-3.19 {MenuWidgetCmd procedure, "configure" option} -setup { destroy .m1 } -body { @@ -1511,7 +1511,7 @@ test menu-3.36 {MenuWidgetCmd procedure, "entryconfigure" option} -setup { llength [.m1 entryconfigure 1] } -cleanup { destroy .m1 -} -result {15} +} -result 15 test menu-3.37 {MenuWidgetCmd procedure, "entryconfigure" option} -setup { destroy .m1 } -body { @@ -1629,7 +1629,7 @@ test menu-3.50 {MenuWidgetCmd procedure, "post" option} -constraints { destroy .m1 } -body { menu .m1 - .m1 add command -label "menu-3.53: hit Escape" -command "puts hello" + .m1 add command -label "menu-3.50: hit Escape" -command "puts hello" .m1 post 40 40 } -cleanup { destroy .m1 @@ -1656,7 +1656,7 @@ test menu-3.53 {MenuWidgetCmd procedure, "postcascade" option} -constraints { destroy .m1 .m2 } -body { menu .m1 - .m1 add command -label "menu-3.56 - hit Escape" + .m1 add command -label "menu-3.53 - hit Escape" menu .m2 .m1 post 40 40 .m1 add cascade -menu .m2 @@ -1758,7 +1758,7 @@ test menu-3.64 {MenuWidgetCmd procedure, "unpost" option} -constraints { destroy .m1 } -body { menu .m1 - .m1 add command -label "menu-3.68 - hit Escape" + .m1 add command -label "menu-3.64 - hit Escape" .m1 post 40 40 .m1 unpost } -cleanup { @@ -1779,7 +1779,7 @@ test menu-3.66a {MenuWidgetCmd procedure, "yposition" option, no tearoff} -setup .m1 yposition 1 } -cleanup { destroy .m1 -} -result {0} +} -result 0 test menu-3.66b {MenuWidgetCmd procedure, "yposition" option, with tearoff} -constraints { notAqua } -setup { @@ -1791,7 +1791,7 @@ test menu-3.66b {MenuWidgetCmd procedure, "yposition" option, with tearoff} -con .m1 yposition 1 } -cleanup { destroy .m1 -} -result {1} +} -result 1 test menu-3.66c {MenuWidgetCmd procedure, "yposition" option, with tearoff} -constraints { aqua } -setup { @@ -1803,7 +1803,7 @@ test menu-3.66c {MenuWidgetCmd procedure, "yposition" option, with tearoff} -con .m1 yposition 1 } -cleanup { destroy .m1 -} -result {0} +} -result 0 test menu-3.67 {MenuWidgetCmd procedure, bad option} -setup { destroy .m1 } -body { @@ -1813,7 +1813,7 @@ test menu-3.67 {MenuWidgetCmd procedure, bad option} -setup { destroy .m1 } -returnCodes error -result {bad option "foo": must be activate, add, cget, clone, configure, delete, entrycget, entryconfigure, index, insert, invoke, post, postcascade, type, unpost, xposition, or yposition} test menu-3.68 {MenuWidgetCmd procedure, fix for bug#508988} -setup { - deleteWindows + deleteWindows } -body { set t .t set m1 .t.m1 @@ -1831,7 +1831,7 @@ test menu-3.68 {MenuWidgetCmd procedure, fix for bug#508988} -setup { $t configure -menu "" list [winfo exists $c1] [winfo exists $c2] } -cleanup { - deleteWindows + deleteWindows } -result {1 1} test menu-3.69 {MenuWidgetCmd procedure, "xposition" option} -setup { destroy .m1 @@ -1869,8 +1869,8 @@ test menu-4.2 {TkInvokeMenu: tearoff} -setup { menu .m1 catch {.m1 invoke 0} } -cleanup { - deleteWindows -} -result {0} + deleteWindows +} -result 0 test menu-4.3 {TkInvokeMenu: checkbutton -on} -setup { destroy .m1 } -body { @@ -2026,7 +2026,7 @@ test menu-5.5 {DestroyMenuInstance - cascades of cloned menus} -setup { list [destroy .m2] [.m1 entrycget 1 -menu] [. configure -menu ""] [destroy .m1] } -returnCodes ok -result {{} .m2 {} {}} test menu-5.6 {DestroyMenuInstance - cascades of cloned menus} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add cascade -menu .m2 @@ -2122,7 +2122,7 @@ test menu-6.4 {TkDestroyMenu - reentrancy - clones} -setup { .m1 clone .m1.m3 destroy .m1 } -cleanup { - deleteWindows + deleteWindows } -returnCodes ok test menu-6.5 {TkDestroyMenu} -setup { destroy .m1 .m2 @@ -2131,7 +2131,7 @@ test menu-6.5 {TkDestroyMenu} -setup { .m1 clone .m2 destroy .m1 winfo exists .m2 -} -result {0} +} -result 0 test menu-6.6 {TkDestroyMenu} -setup { destroy .m1 .m2 } -body { @@ -2263,7 +2263,7 @@ test menu-7.4 {UnhookCascadeEntry} -setup { list [destroy .m1] [destroy .m2] } -returnCodes ok -result {{} {}} test menu-7.5 {UnhookCascadeEntry} -setup { - deleteWindows + deleteWindows } -body { menu .m1 menu .m2 @@ -2274,7 +2274,7 @@ test menu-7.5 {UnhookCascadeEntry} -setup { list [destroy .m1] [destroy .m2 .m3] } -returnCodes ok -result {{} {}} test menu-7.6 {UnhookCascadeEntry} -setup { - deleteWindows + deleteWindows } -body { menu .m1 menu .m2 @@ -2285,7 +2285,7 @@ test menu-7.6 {UnhookCascadeEntry} -setup { list [destroy .m2] [destroy .m1 .m3] } -returnCodes ok -result {{} {}} test menu-7.7 {UnhookCascadeEntry} -setup { - deleteWindows + deleteWindows } -body { menu .m1 menu .m2 @@ -2296,7 +2296,7 @@ test menu-7.7 {UnhookCascadeEntry} -setup { list [destroy .m3] [destroy .m1 .m2] } -returnCodes ok -result {{} {}} test menu-7.8 {UnhookCascadeEntry} -setup { - deleteWindows + deleteWindows } -body { menu .m1 menu .m2 @@ -2367,7 +2367,7 @@ test menu-8.6 {DestroyMenuEntry} -setup { list [.m1 delete 1] [.m1 entrycget 1 -label] [destroy .m1] } -result {{} two {}} test menu-8.7 {DestroyMenuEntry} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add command -label "one" @@ -2384,7 +2384,7 @@ test menu-9.1 {ConfigureMenu} -setup { menu .m1 list [.m1 configure -postcommand "beep"] [.m1 cget -postcommand] } -cleanup { - deleteWindows + deleteWindows } -result {{} beep} test menu-9.2 {ConfigureMenu} -setup { destroy .m1 @@ -2393,7 +2393,7 @@ test menu-9.2 {ConfigureMenu} -setup { .m1 add command -label "test" list [.m1 configure -tearoff 0] [.m1 entrycget 1 -label] } -cleanup { - deleteWindows + deleteWindows } -result {{} test} test menu-9.3 {ConfigureMenu} -setup { destroy .m1 @@ -2401,7 +2401,7 @@ test menu-9.3 {ConfigureMenu} -setup { menu .m1 list [.m1 configure -postcommand "beep"] [.m1 cget -postcommand] } -cleanup { - deleteWindows + deleteWindows } -result {{} beep} test menu-9.4 {ConfigureMenu} -setup { destroy .m1 @@ -2410,7 +2410,7 @@ test menu-9.4 {ConfigureMenu} -setup { .m1 add command -label "test" .m1 configure -fg red } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-9.5 {ConfigureMenu} -setup { destroy .m1 @@ -2420,7 +2420,7 @@ test menu-9.5 {ConfigureMenu} -setup { .m1 add command -label "two" .m1 configure -fg red } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-9.6 {ConfigureMenu} -setup { destroy .m1 @@ -2431,25 +2431,25 @@ test menu-9.6 {ConfigureMenu} -setup { .m1 add command -label "three" .m1 configure -fg red } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-9.7 {ConfigureMenu} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 clone .m2 tearoff list [.m1 configure -fg red] [.m2 cget -fg] } -cleanup { - deleteWindows + deleteWindows } -result {{} red} test menu-9.8 {ConfigureMenu} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 clone .m2 tearoff list [.m2 configure -fg red] [.m1 cget -fg] } -cleanup { - deleteWindows + deleteWindows } -result {{} red} test menu-9.9 {ConfigureMenu} -setup { destroy .m1 @@ -2457,7 +2457,7 @@ test menu-9.9 {ConfigureMenu} -setup { menu .m1 list [. configure -menu .m1] [. configure -menu ""] } -cleanup { - deleteWindows + deleteWindows } -result {{} {}} @@ -2470,7 +2470,7 @@ test menu-10.1 {PostProcessEntry: array variable} -setup { .m1 add checkbutton -variable foo(1) -onvalue on -offvalue off -label "Nonsense" set foo(1) } -cleanup { - deleteWindows + deleteWindows } -result {on} test menu-10.2 {PostProcessEntry: array variable} -setup { destroy .m1 @@ -2480,7 +2480,7 @@ test menu-10.2 {PostProcessEntry: array variable} -setup { .m1 add checkbutton -variable foo(1) -onvalue on -offvalue off -label "Nonsense" set foo(1) } -cleanup { - deleteWindows + deleteWindows } -result {off} @@ -2492,7 +2492,7 @@ test menu-11.1 {ConfigureMenuEntry} -setup { .m1 add checkbutton -variable foo -onvalue on -offvalue off -label "Nonsense" list [.m1 entryconfigure 1 -variable bar] [.m1 entrycget 1 -variable] } -cleanup { - deleteWindows + deleteWindows } -result {{} bar} test menu-11.2 {ConfigureMenuEntry} -setup { destroy .m1 @@ -2501,7 +2501,7 @@ test menu-11.2 {ConfigureMenuEntry} -setup { .m1 add command -label "test" list [.m1 entryconfigure 1 -label ""] [.m1 entrycget 1 -label] } -cleanup { - deleteWindows + deleteWindows } -result {{} {}} test menu-11.3 {ConfigureMenuEntry} -setup { destroy .m1 @@ -2510,83 +2510,83 @@ test menu-11.3 {ConfigureMenuEntry} -setup { .m1 add command list [.m1 entryconfigure 1 -label "test"] [.m1 entrycget 1 -label] } -cleanup { - deleteWindows + deleteWindows } -result {{} test} test menu-11.4 {ConfigureMenuEntry} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add command list [.m1 entryconfigure 1 -accel "S"] [.m1 entrycget 1 -accel] } -cleanup { - deleteWindows + deleteWindows } -result {{} S} test menu-11.5 {ConfigureMenuEntry} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add command list [.m1 entryconfigure 1 -label "test"] [.m1 entrycget 1 -label] } -cleanup { - deleteWindows + deleteWindows } -result {{} test} test menu-11.6 {ConfigureMenuEntry} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add command .m1 entryconfigure 1 -label "test" } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-11.7 {ConfigureMenuEntry} -setup { - deleteWindows + deleteWindows } -body { menu .m2 menu .m1 .m1 add cascade .m1 entryconfigure 1 -label "test" -menu .m2 } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-11.8 {ConfigureMenuEntry} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add cascade .m1 entryconfigure 1 -label "test" -menu .m2 } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-11.9 {ConfigureMenuEntry} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add cascade -menu .m3 .m1 entryconfigure 1 -label "test" -menu .m2 } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-11.10 {ConfigureMenuEntry} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add cascade .m1 entryconfigure 1 -label "test" -menu .m2 } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-11.11 {ConfigureMenuEntry} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add cascade -menu .m2 .m1 entryconfigure 1 -label "test" -menu .m2 } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-11.12 {ConfigureMenuEntry} -setup { - deleteWindows + deleteWindows } -body { menu .m1 menu .m2 @@ -2599,10 +2599,10 @@ test menu-11.12 {ConfigureMenuEntry} -setup { .m5 add cascade .m5 entryconfigure 1 -label "test" -menu .m1 } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-11.13 {ConfigureMenuEntry} -setup { - deleteWindows + deleteWindows } -body { menu .m1 menu .m2 @@ -2613,32 +2613,32 @@ test menu-11.13 {ConfigureMenuEntry} -setup { .m4 add cascade -menu .m1 .m3 entryconfigure 1 -label "test" -menu .m1 } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-11.14 {ConfigureMenuEntry} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add checkbutton list [.m1 entryconfigure 1 -variable "test"] [.m1 entrycget 1 -variable] } -cleanup { - deleteWindows + deleteWindows } -result {{} test} test menu-11.15 {ConfigureMenuEntry} -setup { - deleteWindows + deleteWindows } -body { menu .m1 list [.m1 add checkbutton -label "test"] [.m1 entrycget 1 -variable] } -cleanup { - deleteWindows + deleteWindows } -result {{} test} test menu-11.16 {ConfigureMenuEntry} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add radiobutton -label "test" } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-11.17 {ConfigureMenuEntry} -setup { deleteWindows @@ -2844,35 +2844,35 @@ test menu-13.8 {TkGetMenuIndex} -setup { .m1 entrycget -1 -label } -returnCodes error -result {bad menu entry index "-1"} test menu-13.9 {TkGetMenuIndex} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add command -label "test" .m1 add command -label "test2" .m1 entrycget 999 -label } -cleanup { - deleteWindows + deleteWindows } -result {test2} test menu-13.10 {TkGetMenuIndex} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 insert 999 command -label "test" .m1 entrycget 1 -label } -cleanup { - deleteWindows + deleteWindows } -result {test} test menu-13.11 {TkGetMenuIndex} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add command -label "1test" .m1 entrycget 1test -label } -cleanup { - deleteWindows + deleteWindows } -result {1test} test menu-13.12 {TkGetMenuIndex} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add command -label "test" @@ -2880,176 +2880,176 @@ test menu-13.12 {TkGetMenuIndex} -setup { .m1 add command -label "test3" .m1 entrycget test2 -command } -cleanup { - deleteWindows + deleteWindows } -result {beep} test menu-14.1 {MenuCmdDeletedProc} -setup { - deleteWindows + deleteWindows } -body { menu .m1 destroy .m1 } -cleanup { - deleteWindows + deleteWindows } -returnCodes ok test menu-14.2 {MenuCmdDeletedProc} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 clone .m2 destroy .m1 } -cleanup { - deleteWindows + deleteWindows } -returnCodes ok test menu-15.1 {MenuNewEntry} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add command -label "test" } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-15.2 {MenuNewEntry} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add command -label "test" .m1 add command -label "test3" .m1 insert 2 command -label "test2" } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-15.3 {MenuNewEntry} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add command -label "test" .m1 add command -label "test2" } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-15.4 {MenuNewEntry} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add command -label "test" } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-16.1 {MenuAddOrInsert} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 insert foo command -label "test" } -returnCodes error -result {bad menu entry index "foo"} test menu-16.2 {MenuAddOrInsert} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add command -label "test" .m1 insert test command -label "foo" } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-16.3 {MenuAddOrInsert} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 insert -1 command -label "test" } -returnCodes error -result {bad menu entry index "-1"} test menu-16.4 {MenuAddOrInsert} -setup { - deleteWindows + deleteWindows } -body { menu .m1 -tearoff 1 .m1 add command -label "test" .m1 insert 0 command -label "test2" .m1 entrycget 1 -label } -cleanup { - deleteWindows + deleteWindows } -result {test2} test menu-16.5 {MenuAddOrInsert} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add cascade } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-16.6 {MenuAddOrInsert} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add checkbutton } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-16.7 {MenuAddOrInsert} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add command } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-16.8 {MenuAddOrInsert} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add radiobutton } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-16.9 {MenuAddOrInsert} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add separator } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-16.10 {MenuAddOrInsert} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add blork } -returnCodes error -result {bad menu entry type "blork": must be cascade, checkbutton, command, radiobutton, or separator} test menu-16.11 {MenuAddOrInsert} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add command } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-16.12 {MenuAddOrInsert} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 clone .m2 .m2 clone .m3 list [.m2 add command -label "test"] [.m1 entrycget 1 -label] [.m3 entrycget 1 -label] } -cleanup { - deleteWindows + deleteWindows } -result {{} test test} test menu-16.13 {MenuAddOrInsert} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 clone .m2 .m2 clone .m3 list [.m3 add command -label "test"] [.m1 entrycget 1 -label] [.m2 entrycget 1 -label] } -cleanup { - deleteWindows + deleteWindows } -result {{} test test} test menu-16.14 {MenuAddOrInsert} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add command -blork } -returnCodes error -result {unknown option "-blork"} test menu-16.15 {MenuAddOrInsert} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add command -label "File" @@ -3057,20 +3057,20 @@ test menu-16.15 {MenuAddOrInsert} -setup { . configure -menu .container list [.container add cascade -label "File" -menu .m1] [. configure -menu ""] } -cleanup { - deleteWindows + deleteWindows } -result {{} {}} test menu-16.16 {MenuAddOrInsert} -setup { - deleteWindows + deleteWindows } -body { menu .m1 menu .m2 set tearoff [tk::TearOffMenu .m2] list [.m2 add cascade -menu .m1] [$tearoff unpost] } -cleanup { - deleteWindows + deleteWindows } -result {{} {}} test menu-16.17 {MenuAddOrInsert} -setup { - deleteWindows + deleteWindows } -body { menu .m1 menu .container @@ -3078,10 +3078,10 @@ test menu-16.17 {MenuAddOrInsert} -setup { set tearoff [tk::TearOffMenu .container] list [.container add cascade -label "File" -menu .m1] [. configure -menu ""] } -cleanup { - deleteWindows + deleteWindows } -result {{} {}} test menu-16.18 {MenuAddOrInsert} -setup { - deleteWindows + deleteWindows } -body { menu .m1 menu .container @@ -3089,10 +3089,10 @@ test menu-16.18 {MenuAddOrInsert} -setup { . configure -menu .container list [.container add cascade -label "File" -menu .m1] [. configure -menu ""] } -cleanup { - deleteWindows + deleteWindows } -result {{} {}} test menu-16.19 {MenuAddOrInsert - Insert a cascade deep into the tree} -setup { - deleteWindows + deleteWindows } -body { menu .menubar menu .menubar.test -tearoff 0 @@ -3105,12 +3105,12 @@ test menu-16.19 {MenuAddOrInsert - Insert a cascade deep into the tree} -setup { [info commands .\#menubar.\#menubar\#test.\#menubar\#test\#cascade] \ [. configure -menu ""] } -cleanup { - deleteWindows + deleteWindows } -result {0 .#menubar.#menubar#test.#menubar#test#cascade {}} test menu-17.1 {MenuVarProc} -setup { - deleteWindows + deleteWindows } -body { catch {unset foo} menu .m1 @@ -3118,21 +3118,21 @@ test menu-17.1 {MenuVarProc} -setup { list [.m1 add checkbutton -variable foo -onvalue hello -offvalue goodbye] \ [unset foo] } -cleanup { - deleteWindows + deleteWindows } -result {{} {}} # menu-17.2 - Don't know how to generate the flags in the if test menu-17.2 {MenuVarProc} -setup { - deleteWindows + deleteWindows } -body { catch {unset foo} menu .m1 list [.m1 add checkbutton -variable foo -onvalue hello -offvalue goodbye] \ [set foo ""] } -cleanup { - deleteWindows + deleteWindows } -result {{} {}} test menu-17.3 {MenuVarProc} -setup { - deleteWindows + deleteWindows } -body { catch {unset foo} menu .m1 @@ -3140,30 +3140,30 @@ test menu-17.3 {MenuVarProc} -setup { list [.m1 add checkbutton -variable foo -onvalue hello -offvalue goodbye] \ [set foo "hello"] [unset foo] } -cleanup { - deleteWindows + deleteWindows } -result {{} hello {}} test menu-17.4 {MenuVarProc} -setup { - deleteWindows + deleteWindows } -body { menu .m1 set foo "goodbye" list [.m1 add checkbutton -variable foo -onvalue hello -offvalue goodbye] \ [set foo "hello"] [unset foo] } -cleanup { - deleteWindows + deleteWindows } -result {{} hello {}} test menu-17.5 {MenuVarProc} -setup { - deleteWindows + deleteWindows } -body { menu .m1 set foo "hello" list [.m1 add checkbutton -variable foo -onvalue hello -offvalue goodbye] \ [set foo "goodbye"] [unset foo] } -cleanup { - deleteWindows + deleteWindows } -result {{} goodbye {}} test menu-17.6 {MenuVarProc [5d991b822e]} -setup { - deleteWindows + deleteWindows } -body { # Want this not to crash menu .b @@ -3174,10 +3174,10 @@ test menu-17.6 {MenuVarProc [5d991b822e]} -setup { }}} unset var } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-17.7 {MenuVarProc [5d991b822e]} -setup { - deleteWindows + deleteWindows } -body { # Want this not to duplicate traces menu .b @@ -3188,30 +3188,30 @@ test menu-17.7 {MenuVarProc [5d991b822e]} -setup { }}} unset var } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-18.1 {TkActivateMenuEntry} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add command -label "test" .m1 activate 1 } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-18.2 {TkActivateMenuEntry} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add command -label "test" .m1 activate 0 } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-18.3 {TkActivateMenuEntry} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add command -label "test" @@ -3219,10 +3219,10 @@ test menu-18.3 {TkActivateMenuEntry} -setup { .m1 activate 1 .m1 activate 2 } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-18.4 {TkActivateMenuEntry} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add command -label "test" @@ -3230,112 +3230,112 @@ test menu-18.4 {TkActivateMenuEntry} -setup { .m1 activate 1 .m1 activate 1 } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-19.1 {TkPostCommand} -constraints nonUnixUserInteraction -setup { - deleteWindows + deleteWindows } -body { menu .m1 -postcommand "set menu_test menu-19.1" .m1 add command -label "menu-19.1 - hit Escape" list [.m1 post 40 40] [.m1 unpost] [set menu_test] } -cleanup { - deleteWindows + deleteWindows } -result {menu-19.1 {} menu-19.1} test menu-19.2 {TkPostCommand} -constraints nonUnixUserInteraction -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add command -label "menu-19.2 - hit Escape" list [.m1 post 40 40] [.m1 unpost] } -cleanup { - deleteWindows + deleteWindows } -result {{} {}} test menu-20.1 {CloneMenu} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 clone .m2] } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-20.2 {CloneMenu} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 clone .m2 normal - deleteWindows + deleteWindows } -result {} test menu-20.3 {CloneMenu} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 clone .m2 tearoff } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-20.4 {CloneMenu} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 clone .m2 menubar } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-20.5 {CloneMenu} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 clone .m2 foo } -returnCodes error -result {bad menu type "foo": must be normal, tearoff, or menubar} test menu-20.6 {CloneMenu - hooking up bookeeping ptrs} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 clone .m2 } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-20.7 {CloneMenu - hooking up bookeeping ptrs - multiple children} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 clone .m2 .m1 clone .m3 } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-20.8 {CloneMenu - cascade entries} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add cascade -menu .m2 .m1 clone .foo } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-20.9 {CloneMenu - cascades entries} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add cascade -menu .m2 menu .m2 .m1 clone .foo } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-20.10 {CloneMenu - tearoff fields} -setup { - deleteWindows + deleteWindows } -body { menu .m1 -tearoff 1 list [.m1 clone .m2 normal] [.m2 cget -tearoff] } -cleanup { - deleteWindows + deleteWindows } -result {{} 1} test menu-20.11 {CloneMenu} -setup { - deleteWindows + deleteWindows } -body { menu .m1 menu .m2 @@ -3343,43 +3343,43 @@ test menu-20.11 {CloneMenu} -setup { } -returnCodes error -result {window name "m2" already exists in parent} test menu-21.1 {MenuDoYPosition} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 yposition glorp } -returnCodes error -result {bad menu entry index "glorp"} test menu-21.2 {MenuDoYPosition} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add command -label "Test" .m1 yposition 1 } -cleanup { - deleteWindows + deleteWindows } -returnCodes ok -match glob -result {*} test menu-22.1 {GetIndexFromCoords} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add command -label "test" .m1 configure -tearoff 0 .m1 index @5 } -cleanup { - deleteWindows -} -result {0} + deleteWindows +} -result 0 test menu-22.2 {GetIndexFromCoords} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add command -label "test" .m1 configure -tearoff 0 .m1 index @5,5 } -cleanup { - deleteWindows -} -result {0} + deleteWindows +} -result 0 test menu-22.3 {GetIndexFromCoords: mapped window, y only} -setup { - deleteWindows + deleteWindows } -constraints {x11} -body { menu .m1 .m1 add command -label "test" @@ -3388,10 +3388,10 @@ test menu-22.3 {GetIndexFromCoords: mapped window, y only} -setup { tkwait visibility .m1 .m1 index @5 } -cleanup { - deleteWindows -} -result {0} + deleteWindows +} -result 0 test menu-22.4 {GetIndexFromCoords: mapped window x,y} -setup { - deleteWindows + deleteWindows } -constraints {x11} -body { menu .m1 .m1 add command -label "test" @@ -3402,10 +3402,10 @@ test menu-22.4 {GetIndexFromCoords: mapped window x,y} -setup { set x [expr {[winfo width .m1] - [.m1 cget -borderwidth] - 1}] .m1 index @$x,5 } -cleanup { - deleteWindows -} -result {0} + deleteWindows +} -result 0 test menu-22.5 {GetIndexFromCoords: mapped wide window} -setup { - deleteWindows + deleteWindows } -constraints {x11} -body { menu .m1 .m1 add command -label "test" @@ -3417,20 +3417,20 @@ test menu-22.5 {GetIndexFromCoords: mapped wide window} -setup { set x [expr {[winfo width .m1] - [.m1 cget -borderwidth] - 1}] .m1 index @$x,5 } -cleanup { - deleteWindows -} -result {0} + deleteWindows +} -result 0 test menu-23.1 {RecursivelyDeleteMenu} -setup { - deleteWindows + deleteWindows } -body { menu .m1 . configure -menu .m1 . configure -menu "" } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-23.2 {RecursivelyDeleteMenu} -setup { - deleteWindows + deleteWindows } -body { menu .m2 .m2 add command -label "test2" @@ -3439,28 +3439,28 @@ test menu-23.2 {RecursivelyDeleteMenu} -setup { . configure -menu .m1 . configure -menu "" } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-24.1 {TkNewMenuName} -setup { - deleteWindows + deleteWindows } -body { menu .m1 list [. configure -menu .m1] [. configure -menu ""] } -cleanup { - deleteWindows + deleteWindows } -result {{} {}} test menu-24.2 {TkNewMenuName} -setup { - deleteWindows + deleteWindows } -body { menu .m1 menu .m1\#0 list [. configure -menu .m1] [. configure -menu ""] } -cleanup { - deleteWindows + deleteWindows } -result {{} {}} test menu-24.3 {TkNewMenuName} -setup { - deleteWindows + deleteWindows } -body { menu .#m rename .#m hideme @@ -3470,33 +3470,33 @@ test menu-24.3 {TkNewMenuName} -setup { test menu-25.1 {TkSetWindowMenuBar} -setup { - deleteWindows + deleteWindows } -body { . configure -menu "" list [. configure -menu .m1] [. configure -menu ""] } -cleanup { - deleteWindows + deleteWindows } -result {{} {}} test menu-25.2 {TkSetWindowMenuBar} -setup { - deleteWindows + deleteWindows } -body { . configure -menu "" list [. configure -menu .m1] [. configure -menu ""] } -cleanup { - deleteWindows + deleteWindows } -result {{} {}} test menu-25.3 {TkSetWindowMenuBar} -setup { - deleteWindows + deleteWindows } -body { . configure -menu "" destroy .m1 menu .m1 list [. configure -menu .m1] [. configure -menu ""] } -cleanup { - deleteWindows + deleteWindows } -result {{} {}} test menu-25.4 {TkSetWindowMenuBar} -setup { - deleteWindows + deleteWindows } -body { . configure -menu "" menu .m1 @@ -3504,10 +3504,10 @@ test menu-25.4 {TkSetWindowMenuBar} -setup { menu .m2 list [. configure -menu .m2] [. configure -menu ""] } -cleanup { - deleteWindows + deleteWindows } -result {{} {}} test menu-25.5 {TkSetWindowMenuBar} -setup { - deleteWindows + deleteWindows } -body { . configure -menu "" menu .m1 @@ -3516,10 +3516,10 @@ test menu-25.5 {TkSetWindowMenuBar} -setup { menu .m3 list [. configure -menu .m3] [. configure -menu ""] } -cleanup { - deleteWindows + deleteWindows } -result {{} {}} test menu-25.6 {TkSetWindowMenuBar} -setup { - deleteWindows + deleteWindows } -body { . configure -menu "" menu .m1 @@ -3528,10 +3528,10 @@ test menu-25.6 {TkSetWindowMenuBar} -setup { menu .m3 list [. configure -menu .m3] [. configure -menu ""] } -cleanup { - deleteWindows + deleteWindows } -result {{} {}} test menu-25.7 {TkSetWindowMenuBar} -setup { - deleteWindows + deleteWindows } -body { . configure -menu "" menu .m1 @@ -3541,10 +3541,10 @@ test menu-25.7 {TkSetWindowMenuBar} -setup { .t2 configure -menu .m1 list [.t2 configure -menu .m2] [. configure -menu ""] } -cleanup { - deleteWindows + deleteWindows } -result {{} {}} test menu-25.8 {TkSetWindowMenuBar} -setup { - deleteWindows + deleteWindows } -body { . configure -menu "" menu .m1 @@ -3555,10 +3555,10 @@ test menu-25.8 {TkSetWindowMenuBar} -setup { .t2 configure -menu .m1 list [. configure -menu .m2] [. configure -menu ""] } -cleanup { - deleteWindows + deleteWindows } -result {{} {}} test menu-25.9 {TkSetWindowMenuBar} -setup { - deleteWindows + deleteWindows } -body { . configure -menu "" menu .m1 @@ -3570,10 +3570,10 @@ test menu-25.9 {TkSetWindowMenuBar} -setup { wm geometry .t3 +0+0 list [.t3 configure -menu .m2] [. configure -menu ""] } -cleanup { - deleteWindows + deleteWindows } -result {{} {}} test menu-25.10 {TkSetWindowMenuBar} -setup { - deleteWindows + deleteWindows } -body { . configure -menu "" menu .m1 @@ -3585,10 +3585,10 @@ test menu-25.10 {TkSetWindowMenuBar} -setup { wm geometry .t3 +0+0 list [.t2 configure -menu .m2] [. configure -menu ""] } -cleanup { - deleteWindows + deleteWindows } -result {{} {}} test menu-25.11 {TkSetWindowMenuBar} -setup { - deleteWindows + deleteWindows } -body { . configure -menu "" menu .m1 @@ -3600,57 +3600,57 @@ test menu-25.11 {TkSetWindowMenuBar} -setup { wm geometry .t3 +0+0 list [. configure -menu .m2] [. configure -menu ""] } -cleanup { - deleteWindows + deleteWindows } -result {{} {}} test menu-25.12 {TkSetWindowMenuBar} -setup { - deleteWindows + deleteWindows } -body { . configure -menu "" menu .m1 list [. configure -menu .m1] [. configure -menu ""] } -cleanup { - deleteWindows + deleteWindows } -result {{} {}} test menu-25.13 {TkSetWindowMenuBar} -setup { - deleteWindows + deleteWindows } -body { . configure -menu "" list [. configure -menu .m1] [. configure -menu ""] } -cleanup { - deleteWindows + deleteWindows } -result {{} {}} test menu-25.14 {TkSetWindowMenuBar} -setup { - deleteWindows + deleteWindows } -body { . configure -menu "" menu .m1 list [. configure -menu .m1] [. configure -menu ""] } -cleanup { - deleteWindows + deleteWindows } -result {{} {}} test menu-25.15 {TkSetWindowMenuBar} -setup { - deleteWindows + deleteWindows } -body { . configure -menu "" list [. configure -menu .m1] [. configure -menu ""] } -cleanup { - deleteWindows + deleteWindows } -result {{} {}} test menu-25.16 {TkSetWindowMenuBar} -setup { - deleteWindows + deleteWindows } -body { . configure -menu "" menu .m1 . configure -menu .m1 list [toplevel .t2 -menu m1] [. configure -menu ""] } -cleanup { - deleteWindows + deleteWindows } -result {.t2 {}} test menu-26.1 {DestroyMenuHashTable} -setup { catch {interp delete testinterp} - deleteWindows + deleteWindows } -body { interp create testinterp load {} Tk testinterp @@ -3661,48 +3661,48 @@ test menu-26.1 {DestroyMenuHashTable} -setup { test menu-27.1 {GetMenuHashTable} -setup { catch {interp delete testinterp} - deleteWindows + deleteWindows } -body { interp create testinterp load {} Tk testinterp list [catch {interp eval testinterp {menu .m1}} msg] $msg [interp delete testinterp] } -cleanup { - deleteWindows + deleteWindows } -result {0 .m1 {}} test menu-28.1 {TkCreateMenuReferences - not there before} -setup { - deleteWindows + deleteWindows } -body { menu .m1 } -cleanup { - deleteWindows + deleteWindows } -result {.m1} test menu-28.2 {TkCreateMenuReferences - there already} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add cascade -menu .m2 menu .m2 } -cleanup { - deleteWindows + deleteWindows } -result {.m2} test menu-29.1 {TkFindMenuReferences - not there} -setup { - deleteWindows + deleteWindows } -body { . configure -menu "" menu .m1 .m1 add cascade -menu .m2 list [. configure -menu .m1] [. configure -menu ""] } -cleanup { - deleteWindows + deleteWindows } -result {{} {}} test menu-30.1 {TkFindMenuReferences - there already} -setup { - deleteWindows + deleteWindows } -body { . configure -menu "" menu .m1 @@ -3710,38 +3710,38 @@ test menu-30.1 {TkFindMenuReferences - there already} -setup { .m1 add cascade -menu .m2 list [. configure -menu .m1] [. configure -menu ""] } -cleanup { - deleteWindows + deleteWindows } -result {{} {}} test menu-31.1 {TkFreeMenuReferences - menuPtr} -setup { - deleteWindows + deleteWindows } -body { menu .m1 destroy .m1 } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-31.2 {TkFreeMenuReferences - cascadePtr} -setup { - deleteWindows + deleteWindows } -body { . configure -menu "" menu .m1 .m1 add cascade -menu .m2 .m1 entryconfigure 1 -menu .m3 } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-31.3 {TkFreeMenuReferences - topLevelListPtr} -setup { - deleteWindows + deleteWindows } -body { . configure -menu .m1 . configure -menu "" } -cleanup { - deleteWindows + deleteWindows } -returnCodes ok -result {} test menu-31.4 {TkFreeMenuReferences - not empty} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add cascade -menu .m3 @@ -3749,22 +3749,22 @@ test menu-31.4 {TkFreeMenuReferences - not empty} -setup { .m2 add cascade -menu .m3 .m2 entryconfigure 1 -menu ".foo" } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-32.1 {DeleteMenuCloneEntries} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add command -label foo .m1 clone .m2 .m1 delete 1 } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-32.2 {DeleteMenuCloneEntries} -setup { - deleteWindows + deleteWindows } -body { menu .m1 @@ -3775,10 +3775,10 @@ test menu-32.2 {DeleteMenuCloneEntries} -setup { .m1 clone .m2 .m1 delete 2 3 } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-32.3 {DeleteMenuCloneEntries} -setup { - deleteWindows + deleteWindows } -body { menu .m1 -tearoff 0 .m1 add command -label one @@ -3789,10 +3789,10 @@ test menu-32.3 {DeleteMenuCloneEntries} -setup { .m2 configure -tearoff 1 .m1 delete 1 2 } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-32.4 {DeleteMenuCloneEntries} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add command -label one @@ -3803,10 +3803,10 @@ test menu-32.4 {DeleteMenuCloneEntries} -setup { .m2 configure -tearoff 0 .m1 delete 2 3 } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-32.5 {DeleteMenuCloneEntries} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add command -label one @@ -3815,29 +3815,29 @@ test menu-32.5 {DeleteMenuCloneEntries} -setup { .m1 activate one .m1 delete one } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-32.6 {DeleteMenuCloneEntries - reentrancy - crashes tk8.0} -setup { - deleteWindows + deleteWindows } -body { menu .m1 .m1 add command -label test \ -command ".m1 delete test ; .m1 add command -label test -command \".m1 delete test\"; .m1 delete test" .m1 invoke test } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-32.7 {DeleteMenuCloneEntries - one entry} -setup { - deleteWindows + deleteWindows } -body { menu .m1 -tearoff 0 .m1 add command -label Hello .m1 delete Hello } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-32.8 {Ensure all menu clone commands are deleted} -setup { - deleteWindows + deleteWindows } -body { # SF bug #465324 menu .menubar @@ -3851,11 +3851,11 @@ test menu-32.8 {Ensure all menu clone commands are deleted} -setup { info commands .#menubar*test* } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-32.9 {Ensure deleting of clones doesn't corrupt menu refs} -setup { set res {} - deleteWindows + deleteWindows } -body { menu .menubar . configure -menu .menubar @@ -3873,12 +3873,12 @@ test menu-32.9 {Ensure deleting of clones doesn't corrupt menu refs} -setup { lappend res [.#menubar.#menubar#test entrycget 1 -menu] return $res } -cleanup { - deleteWindows + deleteWindows } -result {.menubar.cascade .#menubar.#menubar#test.#menubar#cascade .menubar.cascade .#menubar.#menubar#test.#menubar#cascade} test menu-33.1 {menu vs command hiding} -setup { - deleteWindows + deleteWindows } -body { set l [interp hidden] menu .m @@ -3896,7 +3896,7 @@ test menu-33.1 {menu vs command hiding} -setup { test menu-34.1 {menus on multiple screens - crashes tk8.3.1, Bug 5454} -constraints { altDisplay } -setup { - deleteWindows + deleteWindows } -body { toplevel .one menu .one.m @@ -3916,7 +3916,7 @@ test menu-35.1 {menu -underline string overruns Bug 1599877} -setup { update tk::TraverseToMenu . "e" } -cleanup { - deleteWindows + deleteWindows } -result {} test menu-37.1 {menubar menues cannot be posted - bug 2160206} -setup { @@ -3931,7 +3931,7 @@ test menu-37.1 {menubar menues cannot be posted - bug 2160206} -setup { } -result {1 {a menubar menu cannot be posted}} test menu-38.1 {Can't dismiss ttk::menubutton menu until mouse has hovered over it - bug fa32290898} -setup { -} -constraints {userInteraction} -body { +} -constraints {x11} -body { toplevel .top ttk::menubutton .top.mb -text "Some menu"; menu .top.mb.m; @@ -3941,14 +3941,13 @@ test menu-38.1 {Can't dismiss ttk::menubutton menu until mouse has hovered over pack .top.mb update # simulate mouse click on the menubutton, which posts its menu - event generate .top.mb <ButtonPress-1> -warp 1 - update - after 50 + event generate .top.mb <Button-1> -warp 1 + controlPointerWarpTiming event generate .top.mb <ButtonRelease-1> update # simulate mouse click on the menu again, i.e. without # entering/leaving the posted menu - event generate .top.mb <ButtonPress-1> + event generate .top.mb <Button-1> update after 50 event generate .top.mb <ButtonRelease-1> @@ -3957,7 +3956,7 @@ test menu-38.1 {Can't dismiss ttk::menubutton menu until mouse has hovered over winfo ismapped .top.mb.m } -cleanup { destroy .top.mb.m .top.m .top -} -result {0} +} -result 0 # cleanup |