Skip to content

Commit

Permalink
fix: make insta test happy
Browse files Browse the repository at this point in the history
  • Loading branch information
OrangeX4 committed Apr 18, 2024
1 parent c2fe1c2 commit 58acfc8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
6 changes: 2 additions & 4 deletions crates/mitex/tests/cvt/basic_text_mode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,15 @@ fn test_convert_text_mode() {
assert_snapshot!(convert_text(r#"abc"#).unwrap(), @"abc");
assert_snapshot!(convert_text(r#"\section{Title}"#).unwrap(), @"#heading(level: 1)[Title];");
assert_snapshot!(convert_text(r#"a \textbf{strong} text"#).unwrap(), @"a #strong[strong]; text");
assert_snapshot!(convert_text(r###"
\section{Title}
assert_snapshot!(convert_text(r###"\section{Title}
A \textbf{strong} text, a \emph{emph} text and inline equation $x + y$.
Also block \eqref{eq:pythagoras}.
\begin{equation}
a^2 + b^2 = c^2 \label{eq:pythagoras}
\end{equation}
"###).unwrap(), @r###"
\end{equation}"###).unwrap(), @r###"
#heading(level: 1)[Title];
Expand Down
12 changes: 4 additions & 8 deletions crates/mitex/tests/cvt/figure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ use super::prelude::*;

#[test]
fn figure() {
assert_snapshot!(convert_text(r###"
\begin{figure}[ht]
assert_snapshot!(convert_text(r###"\begin{figure}[ht]
\centering
\includegraphics[width=0.5\textwidth]{example-image}
\caption{This is an example image.}
\label{fig:example}
\end{figure}
"###).unwrap(), @r###"
\end{figure}"###).unwrap(), @r###"
#figure(caption: [This is an example image.],)[
Expand All @@ -22,8 +20,7 @@ fn figure() {

#[test]
fn table() {
assert_snapshot!(convert_text(r###"
\begin{table}[ht]
assert_snapshot!(convert_text(r###"\begin{table}[ht]
\centering
\begin{tabular}{|c|c|}
\hline
Expand All @@ -35,8 +32,7 @@ fn table() {
\end{tabular}
\caption{This is an example table.}
\label{tab:example}
\end{table}
"###).unwrap(), @r###"
\end{table}"###).unwrap(), @r###"
#figure(caption: [This is an example table.],)[
Expand Down

0 comments on commit 58acfc8

Please sign in to comment.