aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMisty De Meo2013-10-21 18:07:06 -0700
committerMisty De Meo2013-10-21 18:07:06 -0700
commitde871a4daf4947593c87ea2958e842741d9757ad (patch)
tree4c01f7658fb7e74d9ef7a188bb7ef2009af6d4bf /Library
parent2ac9afcc7794c786fda24f023291e820d339da03 (diff)
downloadbrew-de871a4daf4947593c87ea2958e842741d9757ad.tar.bz2
Fix bottle_tag tests
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/test/test_bottle_tag.rb45
1 files changed, 43 insertions, 2 deletions
diff --git a/Library/Homebrew/test/test_bottle_tag.rb b/Library/Homebrew/test/test_bottle_tag.rb
index d6d20929e..d091f9763 100644
--- a/Library/Homebrew/test/test_bottle_tag.rb
+++ b/Library/Homebrew/test/test_bottle_tag.rb
@@ -6,20 +6,61 @@ class BottleTagTests < Test::Unit::TestCase
MacOS.stubs(:version).returns(MacOS::Version.new("10.4"))
Hardware::CPU.stubs(:type).returns(:ppc)
Hardware::CPU.stubs(:family).returns(:foo)
- assert_equal :foo, bottle_tag
+ MacOS.stubs(:prefer_64_bit?).returns(false)
+ assert_equal :tiger_foo, bottle_tag
end
def test_tag_tiger_intel
MacOS.stubs(:version).returns(MacOS::Version.new("10.4"))
Hardware::CPU.stubs(:type).returns(:intel)
+ MacOS.stubs(:prefer_64_bit?).returns(false)
assert_equal :tiger, bottle_tag
end
- def test_tag_leopard
+ def test_tag_tiger_ppc_64
+ MacOS.stubs(:version).returns(MacOS::Version.new("10.4"))
+ Hardware::CPU.stubs(:type).returns(:ppc)
+ Hardware::CPU.stubs(:family).returns(:g5)
+ MacOS.stubs(:prefer_64_bit?).returns(true)
+ assert_equal :tiger_g5_64, bottle_tag
+ end
+
+ # Note that this will probably never be used
+ def test_tag_tiger_intel_64
+ MacOS.stubs(:version).returns(MacOS::Version.new("10.4"))
+ Hardware::CPU.stubs(:type).returns(:intel)
+ assert_equal :tiger_64, bottle_tag
+ end
+
+ def test_tag_leopard_intel
+ MacOS.stubs(:version).returns(MacOS::Version.new("10.5"))
+ Hardware::CPU.stubs(:type).returns(:intel)
+ MacOS.stubs(:prefer_64_bit?).returns(false)
+ assert_equal :leopard, bottle_tag
+ end
+
+ def test_tag_leopard_ppc_64
+ MacOS.stubs(:version).returns(MacOS::Version.new("10.5"))
+ Hardware::CPU.stubs(:type).returns(:ppc)
+ Hardware::CPU.stubs(:family).returns(:g5)
+ MacOS.stubs(:prefer_64_bit?).returns(true)
+ assert_equal :leopard_g5_64, bottle_tag
+ end
+
+ def test_tag_leopard_intel
MacOS.stubs(:version).returns(MacOS::Version.new("10.5"))
+ Hardware::CPU.stubs(:type).returns(:intel)
+ MacOS.stubs(:prefer_64_bit?).returns(false)
assert_equal :leopard, bottle_tag
end
+ def test_tag_leopard_intel_64
+ MacOS.stubs(:version).returns(MacOS::Version.new("10.5"))
+ Hardware::CPU.stubs(:type).returns(:intel)
+ MacOS.stubs(:prefer_64_bit?).returns(true)
+ assert_equal :leopard_64, bottle_tag
+ end
+
def test_tag_snow_leopard_32
MacOS.stubs(:version).returns(MacOS::Version.new("10.6"))
Hardware::CPU.stubs(:is_64_bit?).returns(false)