aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-08-10 16:47:34 -0500
committerJack Nagel2014-08-10 16:47:34 -0500
commitf306e56d214587b5ef6f6b5505b34280da19a075 (patch)
treed7679d76ac4f36d13028997ed6dafce193e7b37b /Library
parent064aff2591440fba625b23d7a1f421c8c6e1fb37 (diff)
downloadbrew-f306e56d214587b5ef6f6b5505b34280da19a075.tar.bz2
Add a test for legacy options
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/test/test_formula.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_formula.rb b/Library/Homebrew/test/test_formula.rb
index 2cd5ed66f..635b4c032 100644
--- a/Library/Homebrew/test/test_formula.rb
+++ b/Library/Homebrew/test/test_formula.rb
@@ -258,4 +258,20 @@ class FormulaTests < Homebrew::TestCase
Object.send(:remove_const, const)
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