homebrew-core/Formula/zdelta.rb
Baptiste Fontaine 5c980d17a9 zdelta: add test
Closes Homebrew/homebrew#37836.

Signed-off-by: Brett Koonce <koonce@gmail.com>
2015-03-18 22:39:26 -07:00

22 lines
643 B
Ruby

class Zdelta < Formula
homepage "http://cis.poly.edu/zdelta/"
url "http://cis.poly.edu/zdelta/downloads/zdelta-2.1.tar.gz"
sha256 "03e6beb2e1235f2091f0146d7f41dd535aefb6078a48912d7d11973d5306de4c"
head "https://github.com/snej/zdelta.git"
def install
system "make", "test", "CC=#{ENV.cc}", "CFLAGS=#{ENV.cflags}"
system "make", "install", "prefix=#{prefix}"
bin.install "zdc", "zdu"
end
test do
msg = "Hello this is Homebrew"
(testpath/"ref").write "Hello I'm a ref file"
compressed = pipe_output("#{bin}/zdc ref", msg, 0)
assert_equal msg, pipe_output("#{bin}/zdu ref", compressed, 0)
end
end