From 3bcb493830bc55af37f4195b173caf96c74676ad Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Tue, 26 Mar 2013 12:38:16 -0500 Subject: [PATCH] aamath: improve test --- Formula/aamath.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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