test: add metafiles to testball

This commit is contained in:
Alex Dunn 2016-01-17 17:01:19 -08:00
parent 37e61aed62
commit 0cde5dd060
7 changed files with 9 additions and 6 deletions

View File

@ -18,3 +18,6 @@ HOMEBREW_CACHE = HOMEBREW_PREFIX.parent+"cache"
HOMEBREW_CACHE_FORMULA = HOMEBREW_PREFIX.parent+"formula_cache" HOMEBREW_CACHE_FORMULA = HOMEBREW_PREFIX.parent+"formula_cache"
HOMEBREW_CELLAR = HOMEBREW_PREFIX.parent+"cellar" HOMEBREW_CELLAR = HOMEBREW_PREFIX.parent+"cellar"
HOMEBREW_LOGS = HOMEBREW_PREFIX.parent+"logs" HOMEBREW_LOGS = HOMEBREW_PREFIX.parent+"logs"
TESTBALL_SHA1 = "be478fd8a80fe7f29196d6400326ac91dad68c37"
TESTBALL_SHA256 = "91e3f7930c98d7ccfb288e115ed52d06b0e5bc16fec7dce8bdda86530027067b"

View File

@ -23,7 +23,7 @@ class ChecksumVerificationTests < Homebrew::TestCase
def test_good_sha1 def test_good_sha1
formula do formula do
sha1 "482e737739d946b7c8cbaf127d9ee9c148b999f5" sha1 TESTBALL_SHA1
end end
assert_checksum_good assert_checksum_good
@ -39,7 +39,7 @@ class ChecksumVerificationTests < Homebrew::TestCase
def test_good_sha256 def test_good_sha256
formula do formula do
sha256 "1dfb13ce0f6143fe675b525fc9e168adb2215c5d5965c9f57306bb993170914f" sha256 TESTBALL_SHA256
end end
assert_checksum_good assert_checksum_good

View File

@ -22,7 +22,7 @@ class FormularyFactoryTest < Homebrew::TestCase
@path.write <<-EOS.undent @path.write <<-EOS.undent
class #{Formulary.class_s(@name)} < Formula class #{Formulary.class_s(@name)} < Formula
url "file://#{File.expand_path("..", __FILE__)}/tarballs/testball-0.1.tbz" url "file://#{File.expand_path("..", __FILE__)}/tarballs/testball-0.1.tbz"
sha256 "1dfb13ce0f6143fe675b525fc9e168adb2215c5d5965c9f57306bb993170914f" sha256 TESTBALL_SHA256
bottle do bottle do
cellar :any_skip_relocation cellar :any_skip_relocation

View File

@ -10,7 +10,7 @@ class PatchingTests < Homebrew::TestCase
def formula(*args, &block) def formula(*args, &block)
super do super do
url "file://#{TEST_DIRECTORY}/tarballs/testball-0.1.tbz" url "file://#{TEST_DIRECTORY}/tarballs/testball-0.1.tbz"
sha1 "482e737739d946b7c8cbaf127d9ee9c148b999f5" sha1 TESTBALL_SHA1
class_eval(&block) class_eval(&block)
end end
end end

View File

@ -2,7 +2,7 @@ class Testball < Formula
def initialize(name = "testball", path = Pathname.new(__FILE__).expand_path, spec = :stable) def initialize(name = "testball", path = Pathname.new(__FILE__).expand_path, spec = :stable)
self.class.instance_eval do self.class.instance_eval do
stable.url "file://#{File.expand_path("..", __FILE__)}/tarballs/testball-0.1.tbz" stable.url "file://#{File.expand_path("..", __FILE__)}/tarballs/testball-0.1.tbz"
stable.sha256 "1dfb13ce0f6143fe675b525fc9e168adb2215c5d5965c9f57306bb993170914f" stable.sha256 TESTBALL_SHA256
end end
super super
end end

View File

@ -2,7 +2,7 @@ class TestballBottle < Formula
def initialize(name = "testball_bottle", path = Pathname.new(__FILE__).expand_path, spec = :stable) def initialize(name = "testball_bottle", path = Pathname.new(__FILE__).expand_path, spec = :stable)
self.class.instance_eval do self.class.instance_eval do
stable.url "file://#{File.expand_path("..", __FILE__)}/tarballs/testball-0.1.tbz" stable.url "file://#{File.expand_path("..", __FILE__)}/tarballs/testball-0.1.tbz"
stable.sha256 "1dfb13ce0f6143fe675b525fc9e168adb2215c5d5965c9f57306bb993170914f" stable.sha256 TESTBALL_SHA256
stable.bottle do stable.bottle do
cellar :any_skip_relocation cellar :any_skip_relocation
root_url "file://#{File.expand_path("..", __FILE__)}/bottles" root_url "file://#{File.expand_path("..", __FILE__)}/bottles"