aamath: improve test

This commit is contained in:
Jack Nagel 2013-03-26 12:38:16 -05:00
parent 053ae7e259
commit 3bcb493830

View file

@ -14,7 +14,11 @@ class Aamath < Formula
prefix.install "testcases"
end
def test
system "cat #{prefix}/testcases | #{bin}/aamath"
test do
IO.popen("#{bin}/aamath", "w+") do |pipe|
pipe.write((prefix/"testcases").read)
pipe.close_write
/#{Regexp.escape("f(x + h) = f(x) + h f'(x)")}/ === pipe.read
end
end
end