aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorBaptiste Fontaine2015-04-12 12:37:17 +0200
committerXu Cheng2015-04-12 21:10:51 +0800
commitb58040c0b6532f95ed2d2be2f04745bea0daa61e (patch)
tree32b0281c0bffd7c3187db28547329cf4f600d9e7 /Library
parent27bf7e900aab8aba7d4371fc19514cec517e6f21 (diff)
downloadhomebrew-b58040c0b6532f95ed2d2be2f04745bea0daa61e.tar.bz2
lzop: test added
Closes #38584. Signed-off-by: Xu Cheng <xucheng@me.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/lzop.rb25
1 files changed, 18 insertions, 7 deletions
diff --git a/Library/Formula/lzop.rb b/Library/Formula/lzop.rb
index 450a6d609..92193bfa2 100644
--- a/Library/Formula/lzop.rb
+++ b/Library/Formula/lzop.rb
@@ -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