homebrew-core/Formula/yajl.rb
Ted Pennings a5d9f13924 yajl: add a test
Closes Homebrew/homebrew#27244.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2014-03-05 19:53:08 -08:00

30 lines
805 B
Ruby

require 'formula'
class Yajl < Formula
homepage 'http://lloyd.github.io/yajl/'
url 'https://github.com/lloyd/yajl/archive/2.0.4.tar.gz'
sha256 '0e78f516dc53ecce7dc073f9a9bb0343186b58ef29dcd1dad74e5e853b216dd5'
bottle do
sha1 "a02d27cc6b98912176bd636ee30aaca464a44ae8" => :mavericks
sha1 "1d8cec340ef78502d9e726a96c416c20ee7e85e1" => :mountain_lion
sha1 "1e7bbbf4f37b9a251c430b2438f3449cc62d5903" => :lion
end
# Configure uses cmake internally
depends_on 'cmake' => :build
def install
ENV.deparallelize
system "./configure", "--prefix=#{prefix}"
system "make install"
(include/'yajl').install Dir['src/api/*.h']
end
test do
output = `echo "[0,1,2,3]" | '#{bin}/json_verify'`
assert $?.success?
assert_match /valid/i, output.strip
end
end