aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
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