aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
diff options
context:
space:
mode:
authorJack Nagel2014-07-30 21:46:22 -0500
committerJack Nagel2014-07-30 21:46:22 -0500
commit21979aa9f69bfc011489ba5413071e8f4eb656d1 (patch)
tree5e70e14081674d95af9435c2a682582beeb4d1f0 /Library/Homebrew/test
parent66b034b943c2c4234c71165d244a581bde5b0b91 (diff)
downloadhomebrew-21979aa9f69bfc011489ba5413071e8f4eb656d1.tar.bz2
Remove confusing implicit options handling
This code is supposed to allow depends_on "foo" => "with-bar" to work when foo has only a "without-bar" option. The options system was not designed to support this. Unfortunately, it was bolted on anyway. The implementation is extremely difficult to understand, and it only works for certain types of options, which is confusing from a user's point of view. Luckily, no formulae in core or the official taps rely on the behavior in order to function. It is hindering progress in improving this code, so I am removing it.
Diffstat (limited to 'Library/Homebrew/test')
-rw-r--r--Library/Homebrew/test/test_build_options.rb29
1 files changed, 0 insertions, 29 deletions
diff --git a/Library/Homebrew/test/test_build_options.rb b/Library/Homebrew/test/test_build_options.rb
index d8327deac..95388a0ea 100644
--- a/Library/Homebrew/test/test_build_options.rb
+++ b/Library/Homebrew/test/test_build_options.rb
@@ -43,35 +43,6 @@ class BuildOptionsTests < Homebrew::TestCase
assert_includes @build.unused_options, "--without-baz"
end
- def test_implicit_options
- # --without-baz is not explicitly specified on the command line (i.e. args)
- # therefore --with-baz should be implicitly assumed:
- assert_includes @build.implicit_options, "--with-baz"
- # But all these should not be in the implict_options:
- refute_includes @build.implicit_options, "--without-baz"
- refute_includes @build.implicit_options, "--with-bar"
- refute_includes @build.implicit_options, "--without-bar"
- refute_includes @build.implicit_options, "--with-qux"
- end
-
- def test_opposite_of
- assert_equal Option.new("without-foo"), @build.opposite_of(Option.new("with-foo"))
- assert_equal Option.new("with-foo"), @build.opposite_of("without-foo")
- assert_equal Option.new("disable-spam"), @build.opposite_of(Option.new("enable-spam"))
- assert_equal Option.new("enable-beer"), @build.opposite_of("disable-beer")
- end
-
- def test_has_opposite_of?
- assert @build.has_opposite_of?("--without-foo")
- assert @build.has_opposite_of?(Option.new("--with-qux"))
- assert !@build.has_opposite_of?("--without-qux")
- assert !@build.has_opposite_of?("--without-nonexisting")
- end
-
- def test_actually_recognizes_implicit_options
- assert @build.has_opposite_of?("--with-baz")
- end
-
def test_copies_do_not_share_underlying_options
orig = BuildOptions.new []
copy = orig.dup