asymptote: use test DSL
parent
4e879067bb
commit
85c659794a
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue