summaryrefslogtreecommitdiffstats
path: root/tests/unixFont.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unixFont.test')
-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..bb694d8 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.11 2009/04/10 15:52:59 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
}
}