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