aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorMike Naberezny2014-02-21 10:22:33 -0800
committerMike McQuaid2014-02-21 20:01:14 +0000
commitd11a05870b5ea309c0fd68773badf22703f87ddc (patch)
tree51115dd4705beb353cd375be057386e9caccda28 /Library/Formula
parent52962334810cd0629d377bd062c7eb01ebcd196a (diff)
downloadhomebrew-d11a05870b5ea309c0fd68773badf22703f87ddc.tar.bz2
q: add test
Closes #26895. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/q.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Formula/q.rb b/Library/Formula/q.rb
index 959b4f060..d5abe5168 100644
--- a/Library/Formula/q.rb
+++ b/Library/Formula/q.rb
@@ -8,5 +8,13 @@ class Q < Formula
def install
bin.install 'q'
end
+
+ test do
+ IO.popen("#{bin}/q 'select sum(c1) from -'", "w+") do |pipe|
+ 1.upto(100) { |i| pipe.puts i }
+ pipe.close_write
+ assert_equal "5050\n", pipe.read
+ end
+ end
end