Skip to content

Commit 5b749e8

Browse files
authored
Merge pull request #199951 from Homebrew/texlive-quoted-heredoc
texlive: use quoted heredoc, use assert_path_exists
2 parents 611e17f + 9c1e6b8 commit 5b749e8

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

Formula/t/texlive.rb

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -576,39 +576,39 @@ def install
576576
assert_match "revision", shell_output("#{bin}/tlmgr --version")
577577
assert_match "AMS mathematical facilities for LaTeX", shell_output("#{bin}/tlmgr info amsmath")
578578

579-
(testpath/"test.latex").write <<~LATEX
580-
\\documentclass[12pt]{article}
581-
\\usepackage[utf8]{inputenc}
582-
\\usepackage{amsmath}
583-
\\usepackage{lipsum}
579+
(testpath/"test.latex").write <<~'LATEX'
580+
\documentclass[12pt]{article}
581+
\usepackage[utf8]{inputenc}
582+
\usepackage{amsmath}
583+
\usepackage{lipsum}
584584
585-
\\title{\\LaTeX\\ test}
586-
\\author{\\TeX\\ Team}
587-
\\date{September 2021}
585+
\title{\LaTeX\ test}
586+
\author{\TeX\ Team}
587+
\date{September 2021}
588588
589-
\\begin{document}
589+
\begin{document}
590590
591-
\\maketitle
591+
\maketitle
592592
593-
\\section*{An equation with amsmath}
594-
\\begin{equation} \\label{eu_eqn}
595-
e^{\\pi i} + 1 = 0
596-
\\end{equation}
597-
The beautiful equation \\ref{eu_eqn} is known as Euler's identity.
593+
\section*{An equation with amsmath}
594+
\begin{equation} \label{eu_eqn}
595+
e^{\pi i} + 1 = 0
596+
\end{equation}
597+
The beautiful equation \ref{eu_eqn} is known as Euler's identity.
598598
599-
\\section*{Lorem Ipsum}
600-
\\lipsum[3]
599+
\section*{Lorem Ipsum}
600+
\lipsum[3]
601601
602-
\\lipsum[5]
602+
\lipsum[5]
603603
604-
\\end{document}
604+
\end{document}
605605
LATEX
606606

607607
assert_match "Output written on test.dvi", shell_output("#{bin}/latex #{testpath}/test.latex")
608-
assert_predicate testpath/"test.dvi", :exist?
608+
assert_path_exists testpath/"test.dvi"
609609
assert_match "Output written on test.pdf", shell_output("#{bin}/pdflatex #{testpath}/test.latex")
610-
assert_predicate testpath/"test.pdf", :exist?
610+
assert_path_exists testpath/"test.pdf"
611611
assert_match "This is dvips", shell_output("#{bin}/dvips #{testpath}/test.dvi 2>&1")
612-
assert_predicate testpath/"test.ps", :exist?
612+
assert_path_exists testpath/"test.ps"
613613
end
614614
end

0 commit comments

Comments
 (0)