Skip to content

Commit

Permalink
aamath: improve test
Browse files Browse the repository at this point in the history
  • Loading branch information
jacknagel committed Mar 26, 2013
1 parent 053ae7e commit 3bcb493
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Formula/aamath.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 3bcb493

Please sign in to comment.