Allow "devel-only" formulae
It seems only natural that this should be possible, or at the very least, it should not result in calling methods on nil.
This commit is contained in:
parent
2e26afe556
commit
4bd34c9624
@ -73,7 +73,8 @@ class Formula
|
|||||||
when @head && ARGV.build_head? then @head # --HEAD
|
when @head && ARGV.build_head? then @head # --HEAD
|
||||||
when @devel && ARGV.build_devel? then @devel # --devel
|
when @devel && ARGV.build_devel? then @devel # --devel
|
||||||
when @bottle && install_bottle?(self) then @bottle # bottle available
|
when @bottle && install_bottle?(self) then @bottle # bottle available
|
||||||
when @stable.nil? && @head then @head # head-only
|
when @devel && @stable.nil? then @devel # devel-only
|
||||||
|
when @head && @stable.nil? then @head # head-only
|
||||||
else @stable
|
else @stable
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -59,6 +59,17 @@ class FormulaValidationTests < Test::Unit::TestCase
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_devel_only_valid
|
||||||
|
assert_nothing_raised do
|
||||||
|
formula do
|
||||||
|
devel do
|
||||||
|
url "foo"
|
||||||
|
version "1.0"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def test_head_only_valid
|
def test_head_only_valid
|
||||||
assert_nothing_raised do
|
assert_nothing_raised do
|
||||||
formula do
|
formula do
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user