summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2024-01-22 21:46:54 (GMT)
committerfvogel <fvogelnew1@free.fr>2024-01-22 21:46:54 (GMT)
commite512946739a3d69a50f106ec6cdf14f30c42349f (patch)
tree5abd4b2c98779299fb1664b427281dee0ebcbac8 /tests
parent930bca60d127aadc6eb563edaac3cc8a59e58f6c (diff)
downloadtk-e512946739a3d69a50f106ec6cdf14f30c42349f.zip
tk-e512946739a3d69a50f106ec6cdf14f30c42349f.tar.gz
tk-e512946739a3d69a50f106ec6cdf14f30c42349f.tar.bz2
Test suite hygiene - Let font-17.1 and font-18.1 be independent from previous tests (interaction was with config-4.47 and config-4.48).
Diffstat (limited to 'tests')
-rw-r--r--tests/font.test31
1 files changed, 18 insertions, 13 deletions
diff --git a/tests/font.test b/tests/font.test
index d57b998..9e84975 100644
--- a/tests/font.test
+++ b/tests/font.test
@@ -747,22 +747,24 @@ test font-16.1 {Tk_NameOfFont procedure} -setup {
test font-17.1 {Tk_FreeFontFromObj - reference counts} -constraints {
- testfont
+ testfont
} -setup {
destroy .b1 .b2 .b3
set result {}
} -body {
- set x {Courier 12}
+ set x [font create font-17.1_font -family Courier -size 12]
button .b1 -font $x
button .b3 -font $x
button .b2 -font $x
- lappend result [testfont counts {Courier 12}]
+ lappend result [testfont counts $x]
destroy .b1
- lappend result [testfont counts {Courier 12}]
+ lappend result [testfont counts $x]
destroy .b2
- lappend result [testfont counts {Courier 12}]
+ lappend result [testfont counts $x]
destroy .b3
- lappend result [testfont counts {Courier 12}]
+ lappend result [testfont counts $x]
+} -cleanup {
+ font delete font-17.1_font
} -result {{{3 1}} {{2 1}} {{1 1}} {}}
test font-17.2 {Tk_FreeFont procedure: one ref} -setup {
destroy .t.f
@@ -834,21 +836,24 @@ test font-18.1 {FreeFontObjProc} -constraints testfont -setup {
destroy .b1
set result {}
} -body {
- set x [join {Courier 12} { }]
+ set f [font create font-18.1_font1 -family Courier -size 12]
+ set x [join [list $f 50] { }]
button .b1 -font $x
- set y [join {Courier 12} { }]
+ set y [join [list $f 50] { }]
.b1 configure -font $y
- set z [join {Courier 12} { }]
+ set z [join [list $f 50] { }]
.b1 configure -font $z
- lappend result [testfont counts {Courier 12}]
+ lappend result [testfont counts [list $f 50]]
set x red
- lappend result [testfont counts {Courier 12}]
+ lappend result [testfont counts [list $f 50]]
set z 32
- lappend result [testfont counts {Courier 12}]
+ lappend result [testfont counts [list $f 50]]
destroy .b1
- lappend result [testfont counts {Courier 12}]
+ lappend result [testfont counts [list $f 50]]
set y bogus
return $result
+} -cleanup {
+ font delete font-18.1_font1
} -result {{{1 3}} {{1 2}} {{1 1}} {}}