aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorMike Naberezny2014-02-13 13:02:19 -0800
committerAdam Vandenberg2014-02-13 19:54:39 -0800
commit3a80fef3b176c9216dc4e396ae467d8032d9f9b3 (patch)
treeac3f11e0336a17f68ac0c94982f9b93182b886b3 /Library/Formula
parent03b69a5cdd1d987f88d0c886a2a67c7f355b8153 (diff)
downloadhomebrew-3a80fef3b176c9216dc4e396ae467d8032d9f9b3.tar.bz2
jq: add test
Closes #26703. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/jq.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Formula/jq.rb b/Library/Formula/jq.rb
index fd694cbf3..09fc718d0 100644
--- a/Library/Formula/jq.rb
+++ b/Library/Formula/jq.rb
@@ -21,4 +21,12 @@ class Jq < Formula
bin.install 'jq'
man1.install 'jq.1'
end
+
+ test do
+ IO.popen("#{bin}/jq .bar", "w+") do |pipe|
+ pipe.puts '{"foo":1, "bar":2}'
+ pipe.close_write
+ assert_equal "2\n", pipe.read
+ end
+ end
end