summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordas <das>2009-04-10 15:53:00 (GMT)
committerdas <das>2009-04-10 15:53:00 (GMT)
commitccfcfc095899812f05e6039e2c77282255a7ef1c (patch)
treef8a8bfb7591b11bafeac721cb19d147b57d8c10d
parent48744e4860d89cb76d21b59855fee32aa81d449c (diff)
downloadtk-ccfcfc095899812f05e6039e2c77282255a7ef1c.zip
tk-ccfcfc095899812f05e6039e2c77282255a7ef1c.tar.gz
tk-ccfcfc095899812f05e6039e2c77282255a7ef1c.tar.bz2
* tests/unixFont.test: only use xlsfonts with X11 windowingsystem.
-rw-r--r--tests/unixFont.test26
1 files changed, 16 insertions, 10 deletions
diff --git a/tests/unixFont.test b/tests/unixFont.test
index 2fa36a6..ca10f21 100644
--- a/tests/unixFont.test
+++ b/tests/unixFont.test
@@ -12,27 +12,33 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: unixFont.test,v 1.10 2004/06/17 22:38:57 dkf Exp $
+# RCS: @(#) $Id: unixFont.test,v 1.10.4.1 2009/04/10 15:53:00 das Exp $
package require tcltest 2.1
eval tcltest::configure $argv
tcltest::loadTestedCommands
-set xlsf [auto_execok xlsfonts]
+if {[tk windowingsystem] eq "x11"} {
+ set xlsf [auto_execok xlsfonts]
+}
foreach {constraint font} {
hasArial arial
hasCourierNew "courier new"
hasTimesNew "times new roman"
} {
- testConstraint $constraint 1
- if {[llength $xlsf]} {
- if {![catch {eval exec $xlsf [list *-$font-*]} res]
- && ![string match *unmatched* $res]} {
- # Newer Unix systems have more default fonts installed,
- # so we can't rely on fallbacks for fonts to need to
- # fall back on anything.
- testConstraint $constraint 0
+ if {[tk windowingsystem] eq "x11"} {
+ testConstraint $constraint 1
+ if {[llength $xlsf]} {
+ if {![catch {eval exec $xlsf [list *-$font-*]} res]
+ && ![string match *unmatched* $res]} {
+ # Newer Unix systems have more default fonts installed,
+ # so we can't rely on fallbacks for fonts to need to
+ # fall back on anything.
+ testConstraint $constraint 0
+ }
}
+ } else {
+ testConstraint $constraint 0
}
}