asymptote: use test DSL

master
Jack Nagel 2013-02-01 23:12:29 -06:00
parent 4e879067bb
commit 85c659794a
1 changed files with 6 additions and 8 deletions

View File

@ -27,10 +27,9 @@ class Asymptote < Formula
system "make install"
end
def test
test do
ENV['TEXMFHOME'] = "#{HOMEBREW_PREFIX}/share/texmf"
mktemp do
(Pathname.pwd+'asy_test.tex').write <<-EOS.undent
(testpath/'asy_test.tex').write <<-EOS.undent
\\nonstopmode
\\documentclass{minimal}
@ -45,12 +44,11 @@ class Asymptote < Formula
\\end{asy}
\\end{document}
EOS
EOS
system "pdflatex asy_test"
system "asy asy_test-1.asy"
system "pdflatex asy_test"
end
system "pdflatex asy_test"
system "asy asy_test-1.asy"
system "pdflatex asy_test"
return (not $? == 0)
end