diff options
author | das <das> | 2009-04-10 15:52:59 (GMT) |
---|---|---|
committer | das <das> | 2009-04-10 15:52:59 (GMT) |
commit | 3249b503d4f3fdedf35e9fb6f6e6449e69c7ee97 (patch) | |
tree | 2c08c4b5ac75a6ac41046c0b5894c0750ad83f09 /tests | |
parent | 7e83dcbfb2128dffc0771e4c181cedbc75259a1e (diff) | |
download | tk-3249b503d4f3fdedf35e9fb6f6e6449e69c7ee97.zip tk-3249b503d4f3fdedf35e9fb6f6e6449e69c7ee97.tar.gz tk-3249b503d4f3fdedf35e9fb6f6e6449e69c7ee97.tar.bz2 |
* tests/unixFont.test: only use xlsfonts with X11 windowingsystem.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unixFont.test | 26 |
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 } } |