Capture longtable sources through the tabular path

This commit is contained in:
gloamxun committed 2026-10-25 01:50:28 +08:00
1 parent d2497dd079
commit 25eef7097b
5 files changed
+55 -11

No files matched your search

+25
View File
@@ -422,6 +422,31 @@ fn project_preview_uses_the_engine_default() {
assert!(svg.contains("TexrraSerif"), "{svg}");
}
#[test]
fn route_d_renders_longtable_sources() {
let server = TestServer::start("route-d-longtable");
let document = "\\documentclass{article}\n\\begin{document}\n\\begin{longtable}{ll}\nAlpha & Beta \\\\\nGamma & Delta\n\\end{longtable}\n\nTail.\n\\end{document}\n";
let response = server.request(
"PUT",
"/api/projects/hello/file?path=hello.tex",
document.as_bytes(),
"text/plain; charset=utf-8",
);
assert_eq!(response.status, 200, "{}", response.text());
let preview = server.request(
"POST",
"/api/projects/hello/preview?engine=route-d",
&[],
"application/json",
);
assert_eq!(preview.status, 200, "{}", preview.text());
let text = preview.text();
for cell in ["Alpha", "Beta", "Gamma", "Delta"] {
assert!(text.contains(cell), "missing {cell}: {text}");
}
assert!(!text.contains("longtable"), "{text}");
}
#[test]
fn engine_parameter_overrides_the_environment_default() {
let main = "\\documentclass{article}\n\\begin{document}\nInline $x$ math.\n\\end{document}\n";