diff --git a/Formula/aamath.rb b/Formula/aamath.rb index b3011d5c8b250..744bb5f4c6743 100644 --- a/Formula/aamath.rb +++ b/Formula/aamath.rb @@ -14,7 +14,11 @@ def install 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