From d11a05870b5ea309c0fd68773badf22703f87ddc Mon Sep 17 00:00:00 2001 From: Mike Naberezny Date: Fri, 21 Feb 2014 10:22:33 -0800 Subject: q: add test Closes #26895. Signed-off-by: Mike McQuaid --- Library/Formula/q.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Library/Formula') 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 -- cgit v1.2.3