homebrew-core/Formula/q.rb

20 lines
503 B
Ruby

class Q < Formula
desc "Treat text as a database"
homepage "https://github.com/harelba/q"
url "https://github.com/harelba/q/archive/2.0.9.tar.gz"
sha256 "5673e96677988661c1615038c1d11641ee9fd2740b3a5d650b43a5c51dd2aceb"
head "https://github.com/harelba/q.git"
bottle :unneeded
def install
bin.install "bin/q"
end
test do
seq = (1..100).map(&:to_s).join("\n")
output = pipe_output("#{bin}/q -c 1 'select sum(c1) from -'", seq)
assert_equal "5050\n", output
end
end