aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMohak Shah2015-04-13 00:04:14 +0530
committerMike McQuaid2015-04-12 21:43:49 -0700
commitf07a718a00caf0349b4ccdec5328ccb582cf8bfe (patch)
tree69bcf4529a6e1f0c908cf8fb89cca55d95430df4 /Library
parent24ebf70a1dcd085598a67d7d398ffba649fa45b0 (diff)
downloadhomebrew-f07a718a00caf0349b4ccdec5328ccb582cf8bfe.tar.bz2
rhash: Added a test block, remove `require "formula"` and updated to SHA256
The test block is basically the one used in coreutils with a very minor modification. Closes #38591. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/rhash.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/Library/Formula/rhash.rb b/Library/Formula/rhash.rb
index a92498cdf..b4e1089e1 100644
--- a/Library/Formula/rhash.rb
+++ b/Library/Formula/rhash.rb
@@ -1,9 +1,7 @@
-require 'formula'
-
class Rhash < Formula
homepage 'http://rhash.anz.ru/'
url 'https://downloads.sourceforge.net/project/rhash/rhash/1.3.2/rhash-1.3.2-src.tar.gz'
- sha1 '15a997c98da1bc3628e065686866b6167951a44d'
+ sha256 '074224f59fe69969108e1ebc23ee406a7f2eff95d9dc1c7aa8eaebb85c8142dd'
bottle do
cellar :any
@@ -25,6 +23,12 @@ class Rhash < Formula
system "make", "install-lib-static", "install-lib-shared", "install", "PREFIX=",
"DESTDIR=#{prefix}", "CC=#{ENV.cc}"
end
+
+ test do
+ (testpath/"test").write("test")
+ (testpath/"test.sha1").write("a94a8fe5ccb19ba61c4c0873d391e987982fbbd3 test")
+ system "#{bin}/rhash", "-c", "test.sha1"
+ end
end
__END__