jsonpp: add test

Closes Homebrew/homebrew#26600.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
master
Mike Naberezny 2014-02-10 17:01:58 -08:00 committed by Adam Vandenberg
parent 74a97dbf2f
commit 1c11978636
1 changed files with 13 additions and 0 deletions

View File

@ -9,4 +9,17 @@ class Jsonpp < Formula
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