Skip to content

Commit

Permalink
Correct oversight regarding previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
erikleunissen committed Jan 6, 2025
1 parent 64863d4 commit 88b4950
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 30 deletions.
2 changes: 1 addition & 1 deletion tests/frame.test
Original file line number Diff line number Diff line change
Expand Up @@ -1738,7 +1738,7 @@ test frame-15.14 {TIP 262: toplevel background images} -setup {

deleteWindows
apply {cmds {foreach cmd $cmds {rename $cmd {}}}} {
eatColors colorsFree uniq optnames
uniq optnames
}
namespace forget ::tk::test::colors::*
cleanupTests
Expand Down
3 changes: 0 additions & 3 deletions tests/visual.test
Original file line number Diff line number Diff line change
Expand Up @@ -524,9 +524,6 @@ test visual-8.2 {Tk_FreeColormap procedure} -constraints haveOtherVisual -setup
#

deleteWindows
rename eatColors {}
rename colorsFree {}

namespace forget ::tk::test::colors::*
cleanupTests
return
Expand Down
34 changes: 8 additions & 26 deletions tests/winfo.test
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,12 @@ namespace import ::tcltest::*
tcltest::configure {*}$argv
tcltest::loadTestedCommands

# Import utility procs for specific functional areas
namespace import -force ::tk::test::colors::*

testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}]
testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }]

# eatColors --
# Creates a toplevel window and allocates enough colors in it to
# use up all the slots in the colormap.
#
# Arguments:
# w - Name of toplevel window to create.
# options - Options for w, such as "-colormap new".

proc eatColors {w {options ""}} {
destroy $w
eval toplevel $w $options
wm geom $w +0+0
canvas $w.c -width 400 -height 200 -bd 0
pack $w.c
for {set y 0} {$y < 8} {incr y} {
for {set x 0} {$x < 40} {incr x} {
set color [format #%02x%02x%02x [expr {$x*6}] [expr {$y*30}] 0]
$w.c create rectangle [expr {10*$x}] [expr {20*$y}] \
[expr {10*$x + 10}] [expr {20*$y + 20}] -outline {} \
-fill $color
}
}
update
}

# XXX - This test file is woefully incomplete. At present, only a
# few of the winfo options are tested.

Expand Down Expand Up @@ -487,8 +465,12 @@ test winfo-14.4 {mapped at idle time} -setup {
destroy .t
} -result 1

#
# CLEANUP
#

deleteWindows
# cleanup
namespace forget ::tk::test::colors::*
cleanupTests
return

Expand Down

0 comments on commit 88b4950

Please sign in to comment.