aamath: improve test
This commit is contained in:
parent
053ae7e259
commit
3bcb493830
1 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue