summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2022-10-30 22:44:40 (GMT)
committerfvogel <fvogelnew1@free.fr>2022-10-30 22:44:40 (GMT)
commitf50987254b0753bf6761d7639faefa2b318b18c0 (patch)
treeaa6275e701a64ed2d268d8dd529e1caf8d1a9122
parentfc7c48c87eb2f396146e4057cd63914bee66f0b5 (diff)
downloadtk-f50987254b0753bf6761d7639faefa2b318b18c0.zip
tk-f50987254b0753bf6761d7639faefa2b318b18c0.tar.gz
tk-f50987254b0753bf6761d7639faefa2b318b18c0.tar.bz2
fontchooser-4.4: Replace constraint failsOnUbuntuNoXft by a more specific constraint hasTimes14Bold checking exactly what is needed. Note: Without the constraint this test returns '9' instead of '14 bold' when run at Github Actions CI with XQuartz because the font actually selected in the fontchooser when requesting -font {times 14 bold} is 'times 9', for an unknown reason.
-rw-r--r--tests/fontchooser.test5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/fontchooser.test b/tests/fontchooser.test
index 471ed64..0c8a694 100644
--- a/tests/fontchooser.test
+++ b/tests/fontchooser.test
@@ -6,8 +6,7 @@ package require tcltest 2.2
eval tcltest::configure $argv
tcltest::loadTestedCommands
-testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}]
-testConstraint failsOnUbuntuNoXft [expr {[testConstraint failsOnUbuntu] || (![catch {tk::pkgconfig get fontsystem} fs] && ($fs eq "xft"))}]
+testConstraint hasTimes14Bold [expr {([font actual {times 14 bold} -size] == 14) && ([font actual {times 14 bold} -weight] eq "bold")}]
# the following helper functions are related to the functions used
# in winDialog.test where they are used to send messages to the win32
@@ -182,7 +181,7 @@ test fontchooser-4.3 {fontchooser -font} -constraints scriptImpl -body {
expr {$::testfont ne {}}
} -result {1}
-test fontchooser-4.4 {fontchooser -font} -constraints {scriptImpl failsOnUbuntuNoXft} -body {
+test fontchooser-4.4 {fontchooser -font} -constraints {scriptImpl hasTimes14Bold} -body {
start {
tk::fontchooser::Configure -command ApplyFont -font {times 14 bold}
tk::fontchooser::Show