From 3249b503d4f3fdedf35e9fb6f6e6449e69c7ee97 Mon Sep 17 00:00:00 2001 From: das Date: Fri, 10 Apr 2009 15:52:59 +0000 Subject: * tests/unixFont.test: only use xlsfonts with X11 windowingsystem. --- tests/unixFont.test | 26 ++++++++++++++++---------- 1 file 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 } } -- cgit v0.12