aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
diff options
context:
space:
mode:
authorMike McQuaid2012-03-08 00:59:11 -0800
committerMike McQuaid2012-03-09 16:49:19 +1300
commitdb23caca52dc3d24f4d10526cca7e3faa7cbb4c4 (patch)
tree9b67723ca68f524c6f44072a337e4012a4e92c91 /Library/Homebrew/test
parent7c177633dc0947692f48c67f75cfce18d6a31cbf (diff)
downloadhomebrew-db23caca52dc3d24f4d10526cca7e3faa7cbb4c4.tar.bz2
Fix test_ENV on 10.7/Xcode 4.
Diffstat (limited to 'Library/Homebrew/test')
-rw-r--r--Library/Homebrew/test/test_ENV.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/Library/Homebrew/test/test_ENV.rb b/Library/Homebrew/test/test_ENV.rb
index d2f4b59f7..5eceaa2bf 100644
--- a/Library/Homebrew/test/test_ENV.rb
+++ b/Library/Homebrew/test/test_ENV.rb
@@ -9,7 +9,13 @@ ARGV.extend(HomebrewArgvExtension)
class EnvironmentTests < Test::Unit::TestCase
def test_ENV_options
ENV.gcc_4_0
- ENV.gcc_4_2
+ begin
+ ENV.gcc_4_2
+ rescue RuntimeError => e
+ if `sw_vers -productVersion` =~ /10\.(\d+)/ and $1.to_i < 7
+ raise e
+ end
+ end
ENV.O3
ENV.minimal_optimization
ENV.no_optimization