From b3693549fa8cc9dfac899c9a85df299dee7a624f Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Tue, 10 Mar 2015 14:11:12 +0000 Subject: cfv: modernise & added test * Modernise style * Switch to SHA256 * Switch to using the Makefile. * Added test. Checksum tests I can handle ;) Closes #37566. Signed-off-by: Mike McQuaid --- Library/Formula/cfv.rb | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'Library') diff --git a/Library/Formula/cfv.rb b/Library/Formula/cfv.rb index 17494c243..4f0a73bda 100644 --- a/Library/Formula/cfv.rb +++ b/Library/Formula/cfv.rb @@ -1,12 +1,18 @@ -require 'formula' - class Cfv < Formula - homepage 'http://cfv.sourceforge.net/' - url 'https://downloads.sourceforge.net/project/cfv/cfv/1.18.3/cfv-1.18.3.tar.gz' - sha1 '8f3361fb9c13fe2645f1df8c177c61459f50e846' + homepage "http://cfv.sourceforge.net/" + url "https://downloads.sourceforge.net/project/cfv/cfv/1.18.3/cfv-1.18.3.tar.gz" + sha256 "ff28a8aa679932b83eb3b248ed2557c6da5860d5f8456ffe24686253a354cff6" def install - man1.install gzip("cfv.1") - bin.install "cfv" + system "make", "prefix=#{prefix}", "mandir=#{man}", "install" + end + + test do + (testpath/"test/test.txt").write "Homebrew!" + cd "test" do + system bin/"cfv", "-t", "sha1", "-C", "test.txt" + assert File.exist?("test.sha1") + assert_match /9afe8b4d99fb2dd5f6b7b3e548b43a038dc3dc38/, File.read("test.sha1") + end end end -- cgit v1.2.3