Add a test for legacy options

This commit is contained in:
Jack Nagel 2014-08-10 16:47:34 -05:00
parent 064aff2591
commit f306e56d21

View File

@ -258,4 +258,20 @@ class FormulaTests < Homebrew::TestCase
Object.send(:remove_const, const) Object.send(:remove_const, const)
end end
end end
def test_legacy_options
f = formula do
url "foo-1.0"
def options
[["--foo", "desc"], ["--bar", "desc"]]
end
option "baz"
end
assert f.option_defined?("foo")
assert f.option_defined?("bar")
assert f.option_defined?("baz")
end
end end