Skip to content

Commit

Permalink
Fixup pandoc test
Browse files Browse the repository at this point in the history
  • Loading branch information
joecorall committed Nov 16, 2024
1 parent c2f2e4c commit d206c39
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 26 deletions.
1 change: 1 addition & 0 deletions ci/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ services:
DOCKER_TAG: ${DOCKER_TAG}
volumes:
- ./test.sh:/test.sh
- ./fixtures:/fixtures
37 changes: 14 additions & 23 deletions ci/fixtures/pandoc/output.tex
Original file line number Diff line number Diff line change
@@ -1,32 +1,23 @@
\section{Title}
\section{Title}\label{title}

\subsection{Subtitle}
\subsection{Subtitle}\label{subtitle}

This is a \textbf{bold} text and an \textit{italic} text.
This is a \textbf{bold} text and an \emph{italic} text.

Here is a bullet list:
\begin{itemize}
\item Item 1
\item Item 2
\end{itemize}
Here is a bullet list: - Item 1 - Item 2

And a numbered list:
\begin{enumerate}
\item First
\item Second
\end{enumerate}
And a numbered list: 1. First 2. Second

Here is an equation:
\[
E = mc^2
\]
Here is an equation: {[} E = mc\^{}2 {]}

A table:

\begin{tabular}{|c|c|}
\hline
\begin{longtable}[]{@{}ll@{}}
\toprule\noalign{}
Column 1 & Column 2 \\
\hline
Data 1 & Data 2 \\
\hline
\end{tabular}
\midrule\noalign{}
\endhead
\bottomrule\noalign{}
\endlastfoot
Data 1 & Data 2 \\
\end{longtable}
6 changes: 3 additions & 3 deletions ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ for SERVICE in "${SERVICES[@]}"; do
rm vtt.txt
elif [ "$SERVICE" == "pandoc" ]; then
curl -o result.tex \
-H "Accept: text/x-latex" \
-H "Content-Type: text/markdown" \
--data-binary "@$(pwd)/ci/fixtures/pandoc/input.md" \
-H "Accept: text/x-latex" \
--data-binary "@/fixtures/pandoc/input.md" \
"$URL"

if diff -u result.tex "$(pwd)/ci/fixtures/pandoc/output.tex" > diff_output.txt; then
if diff -u result.tex "fixtures/pandoc/output.tex" > diff_output.txt; then
echo "Test Passed: Output matches expected."
else
echo "Test Failed: Differences found."
Expand Down

0 comments on commit d206c39

Please sign in to comment.