From fcfb283cb1b6eead5cba4bcff1469816f6b7a819 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Tue, 26 Mar 2013 12:38:16 -0500 Subject: aamath: improve test --- Library/Formula/aamath.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Library/Formula') diff --git a/Library/Formula/aamath.rb b/Library/Formula/aamath.rb index b3011d5c8..744bb5f4c 100644 --- a/Library/Formula/aamath.rb +++ b/Library/Formula/aamath.rb @@ -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 -- cgit v1.2.3