diff options
| author | Misty De Meo | 2013-09-28 12:21:16 -0700 |
|---|---|---|
| committer | Misty De Meo | 2013-12-03 22:42:49 -0800 |
| commit | 5537abbe511b10046adc26ee821d95a977a1efb6 (patch) | |
| tree | 1616d7310525937bb210aac9a1a521fd114b3789 /Library/Homebrew/test | |
| parent | c84f7d0ab2cc23c85d476c66d899b2855ede51be (diff) | |
| download | brew-5537abbe511b10046adc26ee821d95a977a1efb6.tar.bz2 | |
Adjust fails_with syntax for non-Apple compilers
The old version worked like this:
fails_with :gcc => '4.8.1'
That wasn't really flexible enough, and made it harder to distinguish
different releases in the same GCC series. Since no one was really
using it yet, this adjusts the syntax to be more similar to the
Apple compilers:
fails_with :gcc => '4.8' do
release '4.8.1'
end
Like with Apple compilers, omitting `release` blacklists the entire
series.
This also unifies the `build` and `version` attributes and accessors,
and exposes them under both names.
Diffstat (limited to 'Library/Homebrew/test')
| -rw-r--r-- | Library/Homebrew/test/test_fails_with.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Library/Homebrew/test/test_fails_with.rb b/Library/Homebrew/test/test_fails_with.rb index 31f318a4c..642d9c060 100644 --- a/Library/Homebrew/test/test_fails_with.rb +++ b/Library/Homebrew/test/test_fails_with.rb @@ -3,7 +3,7 @@ require 'test/testball' class FailsWithTests < Test::Unit::TestCase class Double < Compiler - attr_accessor :name, :build, :version + attr_accessor :name, :version end def assert_fails_with(cc) @@ -21,8 +21,7 @@ class FailsWithTests < Test::Unit::TestCase def build_cc(sym, build, version=nil) cc = Double.new cc.name = sym - cc.build = build - cc.version = version + cc.version = version || build cc end @@ -49,7 +48,7 @@ class FailsWithTests < Test::Unit::TestCase end def test_non_apple_gcc_version - fails_with(:gcc => '4.8.2') + fails_with(:gcc => '4.8') cc = build_cc("gcc-4.8", nil, "4.8.1") assert_fails_with cc end |
