From eb8a4c5d3d8a7b929854a771d9b401f387a6598a Mon Sep 17 00:00:00 2001 From: ilovezfs Date: Wed, 4 May 2016 12:22:22 -0700 Subject: [PATCH] hqx: revision for devil Also, add a test. Closes #846. Signed-off-by: ilovezfs --- Formula/hqx.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Formula/hqx.rb b/Formula/hqx.rb index ad9f8c4da1..b715a6ea8f 100644 --- a/Formula/hqx.rb +++ b/Formula/hqx.rb @@ -3,6 +3,7 @@ class Hqx < Formula homepage "https://code.google.com/p/hqx/" url "https://hqx.googlecode.com/files/hqx-1.1.tar.gz" sha256 "cc18f571fb4bc325317892e39ecd5711c4901831926bc93296de9ebb7b2f317b" + revision 1 depends_on "devil" @@ -12,4 +13,21 @@ class Hqx < Formula "--prefix=#{prefix}" system "make", "install" end + + test do + system bin/"hqx", test_fixtures("test.jpg"), "out.jpg" + output = pipe_output("php -r \"print_r(getimagesize(\'file://#{testpath}/out.jpg\'));\"") + assert_equal <<-EOS.undent, output + \tArray + \t( + \t [0] => 4 + \t [1] => 4 + \t [2] => 2 + \t [3] => width="4" height="4" + \t [bits] => 8 + \t [channels] => 3 + \t [mime] => image/jpeg + \t) + EOS + end end