From f07a718a00caf0349b4ccdec5328ccb582cf8bfe Mon Sep 17 00:00:00 2001 From: Mohak Shah Date: Mon, 13 Apr 2015 00:04:14 +0530 Subject: 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 --- Library/Formula/rhash.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'Library') 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__ -- cgit v1.2.3