Stop exposing combined options from the tab
This commit is contained in:
parent
e0f86a1a86
commit
ca3c727267
@ -82,13 +82,7 @@ class Tab < OpenStruct
|
||||
end
|
||||
|
||||
def with? name
|
||||
if options.include? "with-#{name}"
|
||||
include? "with-#{name}"
|
||||
elsif options.include? "without-#{name}"
|
||||
not include? "without-#{name}"
|
||||
else
|
||||
false
|
||||
end
|
||||
include?("with-#{name}") || unused_options.include?("without-#{name}")
|
||||
end
|
||||
|
||||
def without? name
|
||||
@ -119,10 +113,6 @@ class Tab < OpenStruct
|
||||
Options.coerce(super)
|
||||
end
|
||||
|
||||
def options
|
||||
used_options + unused_options
|
||||
end
|
||||
|
||||
def cxxstdlib
|
||||
# Older tabs won't have these values, so provide sensible defaults
|
||||
lib = stdlib.to_sym if stdlib
|
||||
|
||||
@ -25,7 +25,6 @@ class TabTests < Homebrew::TestCase
|
||||
tab = Tab.dummy_tab
|
||||
assert_empty tab.unused_options
|
||||
assert_empty tab.used_options
|
||||
assert_empty tab.options
|
||||
refute_predicate tab, :built_as_bottle
|
||||
refute_predicate tab, :poured_from_bottle
|
||||
assert_empty tab.tapped_from
|
||||
@ -52,10 +51,6 @@ class TabTests < Homebrew::TestCase
|
||||
assert_predicate tab, :universal?
|
||||
end
|
||||
|
||||
def test_options
|
||||
assert_equal (@used + @unused).sort, @tab.options.sort
|
||||
end
|
||||
|
||||
def test_cxxstdlib
|
||||
assert_equal :clang, @tab.cxxstdlib.compiler
|
||||
assert_equal :libcxx, @tab.cxxstdlib.type
|
||||
@ -75,7 +70,6 @@ class TabTests < Homebrew::TestCase
|
||||
|
||||
assert_equal @used.sort, tab.used_options.sort
|
||||
assert_equal @unused.sort, tab.unused_options.sort
|
||||
assert_equal (@used + @unused).sort, tab.options.sort
|
||||
refute_predicate tab, :built_as_bottle
|
||||
assert_predicate tab, :poured_from_bottle
|
||||
assert_equal "Homebrew/homebrew", tab.tapped_from
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user