Cover a report-class document and restore a macro test
This commit is contained in:
1 parent
ba05af11f2
commit
39f02b83c0
3 files changed
+31
-2
No files matched your search
@@ -10524,6 +10524,34 @@ Appendix text.
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn compatibility_report_class_document_is_warning_free() {
|
||||
let source = r#"\documentclass{report}
|
||||
\usepackage[margin=1in]{geometry}
|
||||
|
||||
\tableofcontents
|
||||
|
||||
\chapter{Start}
|
||||
|
||||
Report body with \footnote{A note.} and $x^2 = 4$.
|
||||
|
||||
\section{Detail}
|
||||
|
||||
\begin{equation}
|
||||
a = b
|
||||
\end{equation}
|
||||
|
||||
\chapter{Next}
|
||||
|
||||
More text.
|
||||
"#;
|
||||
let preview = preview_json(source).expect("preview");
|
||||
assert!(preview.contains("\"warnings\":[]"), "warnings: {preview}");
|
||||
assert!(preview.contains(">C</text>"), "contents heading");
|
||||
assert!(preview.contains(">1</text>"), "chapter number");
|
||||
assert!(!preview.contains("chapter"), "chapter leaked");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn compatibility_geometry_document_is_warning_free() {
|
||||
let source = r#"\documentclass{article}
|
||||
@@ -11669,6 +11697,7 @@ See \ref{fig:a} and \ref{tab:b}.";
|
||||
assert!(body.contains("<x>."), "{body:?}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn newcommand_definitions_expand_in_the_body() {
|
||||
let source = "\\newcommand{\\R}{\\mathbb{R}}\n\\newcommand{\\pair}[2]{(#1,#2)}\n\n$\\R$ and $\\pair{x}{y}$";
|
||||
let (body, geometry) = geometry_and_body(source);
|
||||
|
||||
Reference in new issue
Block a user