Fix tests and NoMethodError with no X11 installed.

This commit is contained in:
Mike McQuaid 2012-08-25 10:21:29 -07:00
parent d9a18d4c1e
commit 90010f4602
2 changed files with 4 additions and 3 deletions

View File

@ -301,9 +301,10 @@ Please take one of the following actions:
end
end
def x11
def x11 silent=false
unless MacOS::X11.installed?
opoo "You do not have X11 installed, this formula may not build."
opoo "You do not have X11 installed, this formula may not build." unless silent
return
end
# There are some config scripts here that should go in the PATH

View File

@ -15,7 +15,7 @@ class EnvironmentTests < Test::Unit::TestCase
ENV.minimal_optimization
ENV.no_optimization
ENV.libxml2
ENV.x11
ENV.x11 true
ENV.enable_warnings
assert !ENV.cc.empty?
assert !ENV.cxx.empty?