summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2016-12-01 19:27:08 (GMT)
committerfvogel <fvogelnew1@free.fr>2016-12-01 19:27:08 (GMT)
commit9d9cee0288f4ef2d88ddaa3a3f41c34751d851fd (patch)
tree5356d997252077f481ff48f2f29a7104daf904cb /tests
parent39cfdaa0524f329527d9ee22d9229ce476560f05 (diff)
downloadtk-9d9cee0288f4ef2d88ddaa3a3f41c34751d851fd.zip
tk-9d9cee0288f4ef2d88ddaa3a3f41c34751d851fd.tar.gz
tk-9d9cee0288f4ef2d88ddaa3a3f41c34751d851fd.tar.bz2
Also the fact that the actually used fonts must be fixed-width needs to be checked when assessing the value of the haveFontSizes constraint
Diffstat (limited to 'tests')
-rw-r--r--tests/textTag.test18
1 files changed, 10 insertions, 8 deletions
diff --git a/tests/textTag.test b/tests/textTag.test
index a2b2d73..6489c3a 100644
--- a/tests/textTag.test
+++ b/tests/textTag.test
@@ -12,16 +12,18 @@ eval tcltest::configure $argv
tcltest::loadTestedCommands
set textWidgetFont {Courier 12}
-set bigFont {Helvetica 24}
+set bigFont {Courier 24}
-# what is needed is a specific font *size* because in some tests (that
-# will be constrained by haveFontSizes), a tag applying the $bigFont
-# will be set to some characters, which action has the effect of
-# changing what character is under the mouse pointer, which is the
-# purpose of the tests
+# what is needed is a font that is both fixed-width and featuring a
+# specific size because in some tests (that will be constrained by
+# haveFontSizes), a tag applying the $bigFont will be set to some
+# characters, which action has the effect of changing what character
+# is under the mouse pointer, which is the purpose of the tests
testConstraint haveFontSizes [expr {
- [font actual $textWidgetFont -size] == 12 &&
- [font actual $bigFont -size] == 24 }
+ [font metrics $textWidgetFont -fixed] &&
+ [font actual $textWidgetFont -size] == 12 &&
+ [font metrics $bigFont -fixed] &&
+ [font actual $bigFont -size] == 24 }
]
destroy .t