lzop: test added

Closes Homebrew/homebrew#38584.

Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
Baptiste Fontaine 2015-04-12 12:37:17 +02:00 committed by Xu Cheng
parent e81802fd3f
commit 8b52ab36c1

View file

@ -1,15 +1,26 @@
require 'formula'
class Lzop < Formula
homepage 'http://www.lzop.org/'
url 'http://www.lzop.org/download/lzop-1.03.tar.gz'
sha1 '4ee0b49b2a6b0a13572ddca5785ee48ef4c8f80f'
homepage "http://www.lzop.org/"
url "http://www.lzop.org/download/lzop-1.03.tar.gz"
sha256 "c1425b8c77d49f5a679d5a126c90ea6ad99585a55e335a613cae59e909dbb2c9"
depends_on 'lzo'
depends_on "lzo"
def install
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make install"
system "make", "install"
end
test do
path = testpath/"test"
text = "This is Homebrew"
path.write text
system "#{bin}/lzop", "test"
assert File.exist?("test.lzo")
rm path
system "#{bin}/lzop", "-d", "test.lzo"
assert_equal text, path.read
end
end