aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-03-26 12:38:16 -0500
committerJack Nagel2013-03-26 12:58:47 -0500
commitfcfb283cb1b6eead5cba4bcff1469816f6b7a819 (patch)
tree8f967a2ac999786966ded7932e038af423d5e1c8 /Library
parent4918be8b47bec88da4328909f8da236fbc988a54 (diff)
downloadhomebrew-fcfb283cb1b6eead5cba4bcff1469816f6b7a819.tar.bz2
aamath: improve test
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/aamath.rb8
1 files changed, 6 insertions, 2 deletions
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