Skip to content

Commit 88b4950

Browse files
committed
Correct oversight regarding previous commit
1 parent 64863d4 commit 88b4950

File tree

3 files changed

+9
-30
lines changed

3 files changed

+9
-30
lines changed

tests/frame.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1738,7 +1738,7 @@ test frame-15.14 {TIP 262: toplevel background images} -setup {
17381738

17391739
deleteWindows
17401740
apply {cmds {foreach cmd $cmds {rename $cmd {}}}} {
1741-
eatColors colorsFree uniq optnames
1741+
uniq optnames
17421742
}
17431743
namespace forget ::tk::test::colors::*
17441744
cleanupTests

tests/visual.test

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -524,9 +524,6 @@ test visual-8.2 {Tk_FreeColormap procedure} -constraints haveOtherVisual -setup
524524
#
525525

526526
deleteWindows
527-
rename eatColors {}
528-
rename colorsFree {}
529-
530527
namespace forget ::tk::test::colors::*
531528
cleanupTests
532529
return

tests/winfo.test

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,34 +11,12 @@ namespace import ::tcltest::*
1111
tcltest::configure {*}$argv
1212
tcltest::loadTestedCommands
1313

14+
# Import utility procs for specific functional areas
15+
namespace import -force ::tk::test::colors::*
16+
1417
testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}]
1518
testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }]
1619

17-
# eatColors --
18-
# Creates a toplevel window and allocates enough colors in it to
19-
# use up all the slots in the colormap.
20-
#
21-
# Arguments:
22-
# w - Name of toplevel window to create.
23-
# options - Options for w, such as "-colormap new".
24-
25-
proc eatColors {w {options ""}} {
26-
destroy $w
27-
eval toplevel $w $options
28-
wm geom $w +0+0
29-
canvas $w.c -width 400 -height 200 -bd 0
30-
pack $w.c
31-
for {set y 0} {$y < 8} {incr y} {
32-
for {set x 0} {$x < 40} {incr x} {
33-
set color [format #%02x%02x%02x [expr {$x*6}] [expr {$y*30}] 0]
34-
$w.c create rectangle [expr {10*$x}] [expr {20*$y}] \
35-
[expr {10*$x + 10}] [expr {20*$y + 20}] -outline {} \
36-
-fill $color
37-
}
38-
}
39-
update
40-
}
41-
4220
# XXX - This test file is woefully incomplete. At present, only a
4321
# few of the winfo options are tested.
4422

@@ -487,8 +465,12 @@ test winfo-14.4 {mapped at idle time} -setup {
487465
destroy .t
488466
} -result 1
489467

468+
#
469+
# CLEANUP
470+
#
471+
490472
deleteWindows
491-
# cleanup
473+
namespace forget ::tk::test::colors::*
492474
cleanupTests
493475
return
494476

0 commit comments

Comments
 (0)