From 6e512111f6f5019c3e131c7ce80f083c9ecea885 Mon Sep 17 00:00:00 2001 From: Raza Hussain <16100251@lums.edu.pk> Date: Wed, 29 Mar 2017 04:39:31 -0400 Subject: [PATCH] latex2html: add test (#11712) --- Formula/latex2html.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Formula/latex2html.rb b/Formula/latex2html.rb index fab49c0fbf..74cb4d650d 100644 --- a/Formula/latex2html.rb +++ b/Formula/latex2html.rb @@ -20,4 +20,18 @@ class Latex2html < Formula "--with-texpath=#{share}/texmf/tex/latex/html" system "make", "install" end + + test do + (testpath/"test.tex").write <<-EOS.undent + \\documentclass{article} + \\usepackage[utf8]{inputenc} + \\title{Experimental Setup} + \\date{\\today} + \\begin{document} + \\maketitle + \\end{document} + EOS + system "#{bin}/latex2html", "test.tex" + assert_match /Experimental Setup/, File.read("test/test.html") + end end