homebrew-core/Formula/jsonpp.rb
Mike Naberezny 1c11978636 jsonpp: add test
Closes Homebrew/homebrew#26600.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2014-02-10 19:41:10 -08:00

25 lines
557 B
Ruby

require 'formula'
class Jsonpp < Formula
homepage 'http://jmhodges.github.io/jsonpp/'
url 'https://github.com/jmhodges/jsonpp/releases/v1.2.0/715/jsonpp-1.2.0-osx-x86_64.zip'
version '1.2.0'
sha1 '422d5b2cefa92923d2fbef9afe1324d72134509e'
def install
bin.install 'jsonpp'
end
test do
IO.popen("#{bin}/jsonpp", "w+") do |pipe|
pipe.puts '{"foo":"bar","baz":"qux"}'
pipe.close_write
assert_equal <<-EOS.undent, pipe.read
{
"foo": "bar",
"baz": "qux"
}
EOS
end
end
end