diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/color.test | 4 | ||||
-rw-r--r-- | tests/grid.test | 2 | ||||
-rw-r--r-- | tests/message.test | 4 | ||||
-rw-r--r-- | tests/pack.test | 6 | ||||
-rw-r--r-- | tests/raise.test | 4 | ||||
-rw-r--r-- | tests/scale.test | 4 | ||||
-rw-r--r-- | tests/ttk/ttk.test | 2 | ||||
-rw-r--r-- | tests/unixEmbed.test | 84 |
8 files changed, 54 insertions, 56 deletions
diff --git a/tests/color.test b/tests/color.test index c3ae066..af0695e 100644 --- a/tests/color.test +++ b/tests/color.test @@ -209,7 +209,7 @@ test color-2.11 {Tk_GetColor, 6 hex digits, last one invalid} -body { } -returnCodes error -result {invalid color name "#12345g"} test color-3.1 {Tk_FreeColor procedure, reference counting} colorsFree { - eval destroy [winfo child .t] + destroy {*}[winfo children .t] mkColors .t.c 40 6 0 240 240 0 -6 0 0 0 -40 pack .t.c mkColors .t.c2 20 1 250 0 0 -10 0 0 0 0 0 @@ -223,7 +223,7 @@ test color-3.1 {Tk_FreeColor procedure, reference counting} colorsFree { lappend result [colorsFree .t] } {0 1} test color-3.2 {Tk_FreeColor procedure, flushing stressed cmap information} colorsFree { - eval destroy [winfo child .t] + destroy {*}[winfo children .t] mkColors .t.c 40 6 0 240 240 0 -6 0 0 0 -40 pack .t.c mkColors .t.c2 20 1 250 0 0 -10 0 0 0 0 0 diff --git a/tests/grid.test b/tests/grid.test index afcc4c0..9aa2f84 100644 --- a/tests/grid.test +++ b/tests/grid.test @@ -23,7 +23,7 @@ proc grid_reset {{test ?} {top .}} { gets stdin } } - eval destroy [winfo children $top] + destroy {*}[winfo children $top] update foreach {cols rows} [grid size .] {} for {set i 0} {$i <= $cols} {incr i} { diff --git a/tests/message.test b/tests/message.test index 9018fc2..61a9e99 100644 --- a/tests/message.test +++ b/tests/message.test @@ -404,7 +404,7 @@ test message-2.2 {Tk_MessageObjCmd procedure} -body { } -returnCodes {error} -result {bad window path name "foo"} test message-2.3 {Tk_MessageObjCmd procedure} -body { catch {message foo} - winfo child . + winfo children . } -result {} test message-2.4 {Tk_MessageObjCmd procedure} -body { @@ -412,7 +412,7 @@ test message-2.4 {Tk_MessageObjCmd procedure} -body { } -returnCodes {error} -result {unknown option "-gorp"} test message-2.5 {Tk_MessageObjCmd procedure} -body { catch {message .s -gorp dump} - winfo child . + winfo children . } -result {} diff --git a/tests/pack.test b/tests/pack.test index 1644ca1..0731125 100644 --- a/tests/pack.test +++ b/tests/pack.test @@ -1556,7 +1556,7 @@ test pack-17.2 {PackLostContentProc procedure} -setup { test pack-18.1.1 {unmap content when container unmapped} -constraints { macOrUnix failsOnUbuntu failsOnXQuarz } -setup { - destroy {*}[winfo child .pack] + destroy {*}[winfo children .pack] # adjust the position of .pack before test to avoid a screen switch # that occurs with window managers that have desktops four times as big # as the screen (screen switch causes scale and other tests to fail). @@ -1579,7 +1579,7 @@ test pack-18.1.1 {unmap content when container unmapped} -constraints { test pack-18.1.2 {unmap content when container unmapped} -constraints { win } -setup { - destroy {*}[winfo child .pack] + destroy {*}[winfo children .pack] # adjust the position of .pack before test to avoid a screen switch # that occurs with window managers that have desktops four times as big # as the screen (screen switch causes scale and other tests to fail). @@ -1600,7 +1600,7 @@ test pack-18.1.2 {unmap content when container unmapped} -constraints { } -result {1 0 200 75 1} test pack-18.2 {unmap content when container unmapped} -constraints {failsOnUbuntu failsOnXQuarz} -setup { - destroy {*}[winfo child .pack] + destroy {*}[winfo children .pack] # adjust the position of .pack before test to avoid a screen switch # that occurs with window managers that have desktops four times as big # as the screen (screen switch causes scale and other tests to fail). diff --git a/tests/raise.test b/tests/raise.test index b6890e9..2e9e2c6 100644 --- a/tests/raise.test +++ b/tests/raise.test @@ -17,9 +17,7 @@ namespace import -force tcltest::test # make it easy to detect differences in order. proc raise_setup {} { - foreach i [winfo child .raise] { - destroy $i - } + destroy {*}[winfo children .raise] update idletasks foreach i {a b c d e} { label .raise.$i -text $i -relief raised -bd 2 diff --git a/tests/scale.test b/tests/scale.test index 55abe0e..f08015e 100644 --- a/tests/scale.test +++ b/tests/scale.test @@ -328,14 +328,14 @@ test scale-2.2 {Tk_ScaleCmd procedure} -body { } -returnCodes error -result {bad window path name "foo"} test scale-2.3 {Tk_ScaleCmd procedure} -body { catch {scale foo} - winfo child . + winfo children . } -result {} test scale-2.4 {Tk_ScaleCmd procedure} -body { scale .s -gorp dumb } -returnCodes error -result {unknown option "-gorp"} test scale-2.5 {Tk_ScaleCmd procedure} -body { catch {scale .s -gorp dumb} - winfo child . + winfo children . } -result {} diff --git a/tests/ttk/ttk.test b/tests/ttk/ttk.test index 0f80487..74cd80a 100644 --- a/tests/ttk/ttk.test +++ b/tests/ttk/ttk.test @@ -675,7 +675,7 @@ test ttk-16.2 {ttk::style theme styles - theme exists} -body { } -result 1 -eval destroy [winfo children .] +destroy {*}[winfo children .] tcltest::cleanupTests diff --git a/tests/unixEmbed.test b/tests/unixEmbed.test index 066c30d..e67278d 100644 --- a/tests/unixEmbed.test +++ b/tests/unixEmbed.test @@ -142,7 +142,7 @@ test unixEmbed-1.5 {Tk_UseWindow procedure, creating Container records} -constra pack .f1 .f2 dobg "set w [winfo id .f1]" dobg { - eval destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t -use $w list [testembed] [expr [lindex [lindex [testembed all] 0] 0] - $w] } @@ -162,7 +162,7 @@ test unixEmbed-1.5a {Tk_UseWindow procedure, creating Container records} -constr pack .f1 .f2 child alias w winfo id .f1 child eval { - destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t -use [w] list [testembed] [expr {[lindex [lindex [testembed all] 0] 0] - [w]}] } @@ -181,7 +181,7 @@ test unixEmbed-1.6 {Tk_UseWindow procedure, creating Container records} -constra dobg "set w1 [winfo id .f1]" dobg "set w2 [winfo id .f2]" dobg { - eval destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use $w1 toplevel .t2 -use $w2 testembed @@ -203,7 +203,7 @@ test unixEmbed-1.6a {Tk_UseWindow procedure, creating Container records} -constr child alias w1 winfo id .f1 child alias w2 winfo id .f2 child eval { - destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use [w1] toplevel .t2 -use [w2] testembed @@ -240,7 +240,7 @@ test unixEmbed-2.1 {EmbeddedEventProc procedure} -constraints { pack .f1 dobg "set w1 [winfo id .f1]" dobg { - eval destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use $w1 testembed } @@ -264,7 +264,7 @@ test unixEmbed-2.1a {EmbeddedEventProc procedure} -constraints { pack .f1 child alias w1 winfo id .f1 child eval { - destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use [w1] testembed } @@ -285,7 +285,7 @@ test unixEmbed-2.2 {EmbeddedEventProc procedure} -constraints { pack .f1 dobg "set w1 [winfo id .f1]" dobg { - eval destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use $w1 testembed destroy .t1 @@ -306,7 +306,7 @@ test unixEmbed-2.2a {EmbeddedEventProc procedure} -constraints { pack .f1 child alias w1 winfo id .f1 child eval { - destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use [w1] testembed destroy .t1 @@ -353,7 +353,7 @@ test unixEmbed-3.1 {ContainerEventProc procedure, detect creation} -constraints dobg "set w1 [winfo id .f1]" set x [testembed] dobg { - eval destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use $w1 wm withdraw .t1 } @@ -373,7 +373,7 @@ test unixEmbed-3.1a {ContainerEventProc procedure, detect creation} -constraints child alias w1 winfo id .f1 set x [testembed] child eval { - destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use [w1] wm withdraw .t1 } @@ -405,7 +405,7 @@ test unixEmbed-3.3 {ContainerEventProc procedure, disallow position changes} -co pack .f1 dobg "set w1 [winfo id .f1]" dobg { - eval destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use $w1 -bd 2 -relief raised update wm geometry .t1 +30+40 @@ -429,7 +429,7 @@ test unixEmbed-3.3a {ContainerEventProc procedure, disallow position changes} -c pack .f1 child alias w1 winfo id .f1 child eval { - destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use [w1] -bd 2 -relief raised update wm geometry .t1 +30+40 @@ -449,7 +449,7 @@ test unixEmbed-3.4 {ContainerEventProc procedure, disallow position changes} -co pack .f1 dobg "set w1 [winfo id .f1]" dobg { - eval destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use $w1 update wm geometry .t1 300x100+30+40 @@ -473,7 +473,7 @@ test unixEmbed-3.4a {ContainerEventProc procedure, disallow position changes} -c pack .f1 child alias w1 winfo id .f1 child eval { - destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use [w1] update wm geometry .t1 300x100+30+40 @@ -493,7 +493,7 @@ test unixEmbed-3.5 {ContainerEventProc procedure, geometry requests} -constraint pack .f1 dobg "set w1 [winfo id .f1]" dobg { - eval destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use $w1 } update @@ -517,7 +517,7 @@ test unixEmbed-3.5a {ContainerEventProc procedure, geometry requests} -constrain pack .f1 child alias w1 winfo id .f1 child eval { - destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use [w1] .t1 configure -width 300 -height 80 update @@ -536,7 +536,7 @@ test unixEmbed-3.6 {ContainerEventProc procedure, map requests} -constraints { pack .f1 dobg "set w1 [winfo id .f1]" dobg { - eval destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use $w1 set x unmapped bind .t1 <Map> {set x mapped} @@ -562,7 +562,7 @@ test unixEmbed-3.6a {ContainerEventProc procedure, map requests} -constraints { pack .f1 child alias w1 winfo id .f1 child eval { - destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use [w1] set x unmapped bind .t1 <Map> {set x mapped} @@ -586,7 +586,7 @@ test unixEmbed-3.7 {ContainerEventProc procedure, destroy events} -constraints { bind .f1 <Destroy> {set x dead} set x alive dobg { - eval destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use $w1 } update @@ -612,7 +612,7 @@ test unixEmbed-3.7a {ContainerEventProc procedure, destroy events} -constraints bind .f1 <Destroy> {set x dead} set x alive child eval { - destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use [w1] update destroy .t1 @@ -633,7 +633,7 @@ test unixEmbed-4.1 {EmbedStructureProc procedure, configure events} -constraints pack .f1 dobg "set w1 [winfo id .f1]" dobg { - eval destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use $w1 } update @@ -659,7 +659,7 @@ test unixEmbed-4.1a {EmbedStructureProc procedure, configure events} -constraint pack .f1 child alias w1 winfo id .f1 child eval { - destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use [w1] update .t1 configure -width 180 -height 100 @@ -679,7 +679,7 @@ test unixEmbed-4.2 {EmbedStructureProc procedure, destroy events} -constraints { pack .f1 dobg "set w1 [winfo id .f1]" dobg { - eval destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use $w1 } update @@ -703,7 +703,7 @@ test unixEmbed-4.2a {EmbedStructureProc procedure, destroy events} -constraints update child alias w1 winfo id .f1 child eval { - destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use [w1] } set x [testembed] @@ -725,7 +725,7 @@ test unixEmbed-5.1 {EmbedFocusProc procedure, FocusIn events} -constraints { update dobg "set w1 [winfo id .f1]" dobg { - eval destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use $w1 bind .t1 <FocusIn> {lappend x "focus in %W"} bind .t1 <FocusOut> {lappend x "focus out %W"} @@ -750,7 +750,7 @@ test unixEmbed-5.1a {EmbedFocusProc procedure, FocusIn events} -constraints { update child alias w1 winfo id .f1 child eval { - destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use [w1] bind .t1 <FocusIn> {lappend x "focus in %W"} bind .t1 <FocusOut> {lappend x "focus out %W"} @@ -774,7 +774,7 @@ test unixEmbed-5.2 {EmbedFocusProc procedure, focusing on dead window} -constrai update dobg "set w1 [winfo id .f1]" dobg { - eval destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use $w1 } update @@ -800,7 +800,7 @@ test unixEmbed-5.2a {EmbedFocusProc procedure, focusing on dead window} -constra update child alias w1 winfo id .f1 child eval { - destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use [w1] update after 200 {destroy .t1} @@ -822,7 +822,7 @@ test unixEmbed-5.3 {EmbedFocusProc procedure, FocusOut events} -constraints { update dobg "set w1 [winfo id .f1]" dobg { - eval destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use $w1 bind .t1 <FocusIn> {lappend x "focus in %W"} bind .t1 <FocusOut> {lappend x "focus out %W"} @@ -850,7 +850,7 @@ test unixEmbed-5.3a {EmbedFocusProc procedure, FocusOut events} -constraints { update child alias w1 winfo id .f1 child eval { - destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use [w1] set x {} bind .t1 <FocusIn> {lappend x "focus in %W"} @@ -878,7 +878,7 @@ test unixEmbed-6.1 {EmbedGeometryRequest procedure, window changes size} -constr pack .f1 dobg "set w1 [winfo id .f1]" dobg { - eval destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use $w1 update bind .t1 <Configure> {lappend x {configure .t1 %w %h}} @@ -902,7 +902,7 @@ test unixEmbed-6.1a {EmbedGeometryRequest procedure, window changes size} -const pack .f1 child alias w1 winfo id .f1 child eval { - destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use [w1] update bind .t1 <Configure> {set x {configure .t1 %w %h}} @@ -924,7 +924,7 @@ test unixEmbed-6.2 {EmbedGeometryRequest procedure, window changes size} -constr place .f1 -width 200 -height 200 dobg "set w1 [winfo id .f1]" dobg { - eval destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use $w1 update bind .t1 <Configure> {lappend x {configure .t1 %w %h}} @@ -949,7 +949,7 @@ test unixEmbed-6.2a {EmbedGeometryRequest procedure, window changes size} -const update child alias w1 winfo id .f1 child eval { - destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use [w1] update bind .t1 <Configure> {set x {configure .t1 %w %h}} @@ -975,7 +975,7 @@ test unixEmbed-7.1 {TkpRedirectKeyEvent procedure, forward keystroke} -constrain pack .f1 dobg "set w1 [winfo id .f1]" dobg { - eval destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use $w1 } focus -force . @@ -1009,7 +1009,7 @@ test unixEmbed-7.1a {TkpRedirectKeyEvent procedure, forward keystroke} -constrai pack .f1 child alias w1 winfo id .f1 child eval { - destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use [w1] } focus -force . @@ -1038,7 +1038,7 @@ test unixEmbed-7.2 {TkpRedirectKeyEvent procedure, don't forward keystroke width pack .f1 dobg "set w1 [winfo id .f1]" dobg { - eval destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use $w1 } update @@ -1071,7 +1071,7 @@ test unixEmbed-7.2a {TkpRedirectKeyEvent procedure, don't forward keystroke widt pack .f1 child alias w1 winfo id .f1 child eval { - destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use [w1] } update @@ -1104,7 +1104,7 @@ test unixEmbed-8.1 {TkpClaimFocus procedure} -constraints { pack .f1 .f2 dobg "set w1 [winfo id .f1]" dobg { - eval destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use $w1 -highlightthickness 2 -bd 2 -relief sunken } focus -force .f2 @@ -1132,7 +1132,7 @@ test unixEmbed-8.1a {TkpClaimFocus procedure} -constraints unix -setup { update child alias w1 winfo id .f1 child eval { - destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use [w1] -highlightthickness 2 -bd 2 -relief sunken } # This should clear focus from the application embedded in .f1 @@ -1206,7 +1206,7 @@ test unixEmbed-9.2 {EmbedWindowDeleted procedure, check embeddedPtr} -constraint update dobg "set w1 [winfo id .f1]" dobg { - eval destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use $w1 -highlightthickness 2 -bd 2 -relief sunken set x {} lappend x [testembed] @@ -1228,7 +1228,7 @@ test unixEmbed-9.2a {EmbedWindowDeleted procedure, check embeddedPtr} -constrain pack .f1 child alias w1 winfo id .f1 child eval { - destroy [winfo child .] + destroy {*}[winfo children .] toplevel .t1 -use [w1] -highlightthickness 2 -bd 2 -relief sunken set x {} lappend x [testembed] |