diff options
| author | Xu Cheng | 2015-01-06 14:38:00 +0800 |
|---|---|---|
| committer | Mike McQuaid | 2015-01-06 08:17:42 +0000 |
| commit | 0321e4bebcc7e0794ceebb7d2d53299f07be2004 (patch) | |
| tree | ca13ad06aca090d41a82a380fce03d1b36252183 | |
| parent | 10402bc9716731e7738a1ddbe88ea3ad0b4b8d62 (diff) | |
| download | homebrew-0321e4bebcc7e0794ceebb7d2d53299f07be2004.tar.bz2 | |
libzzip: add test
Closes #35594.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
| -rw-r--r-- | Library/Formula/libzzip.rb | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/Library/Formula/libzzip.rb b/Library/Formula/libzzip.rb index 531c8df4f..4cb27ae33 100644 --- a/Library/Formula/libzzip.rb +++ b/Library/Formula/libzzip.rb @@ -1,9 +1,7 @@ -require 'formula' - class Libzzip < Formula - homepage 'http://sourceforge.net/projects/zziplib/' - url 'https://downloads.sourceforge.net/project/zziplib/zziplib13/0.13.62/zziplib-0.13.62.tar.bz2' - sha1 'cf8b642abd9db618324a1b98cc71492a007cd687' + homepage "http://sourceforge.net/projects/zziplib/" + url "https://downloads.sourceforge.net/project/zziplib/zziplib13/0.13.62/zziplib-0.13.62.tar.bz2" + sha1 "cf8b642abd9db618324a1b98cc71492a007cd687" bottle do cellar :any @@ -13,15 +11,15 @@ class Libzzip < Formula sha1 "986d13aa3974d0b7c2621a8447f1aad640f11d92" => :mountain_lion end - option 'with-sdl', 'Enable SDL usage and create SDL_rwops_zzip.pc' + option "with-sdl", "Enable SDL usage and create SDL_rwops_zzip.pc" option :universal deprecated_option "sdl" => "with-sdl" - depends_on 'pkg-config' => :build - depends_on 'sdl' => :optional + depends_on "pkg-config" => :build + depends_on "sdl" => :optional - conflicts_with 'zzuf', :because => 'both install `zzcat` binaries' + conflicts_with "zzuf", :because => "both install `zzcat` binaries" def install if build.universal? @@ -36,9 +34,15 @@ class Libzzip < Formula --prefix=#{prefix} ] args << "--enable-sdl" if build.with? "sdl" - system './configure', *args - system 'make install' + system "./configure", *args + system "make", "install" ENV.deparallelize # fails without this when a compressed file isn't ready - system 'make check' # runing this after install bypasses DYLD issues + system "make", "check" # runing this after install bypasses DYLD issues + end + + test do + (testpath/"README.txt").write("Hello World!") + system "zip", "test.zip", "README.txt" + assert_equal "Hello World!", shell_output("#{bin}/zzcat test/README.txt") end end |
