Honor e-TeX split shrink masks on native vertical lists

This commit is contained in:
gloamxun committed 2026-11-28 08:46:51 +08:00
1 parent 69efe0b895
commit 34325317d2
11 files changed
+187 -28

No files matched your search

@@ -204,6 +204,44 @@ fn local_trace_switches_channels_and_disabled_diagnostics_preserve_actual_pages(
);
fs::remove_dir_all(p).unwrap();
}
#[test]
fn ignored_insertion_shrink_is_log_only_and_follows_page_observation_order() {
let s = r"\catcode123=1 \catcode125=2
\tracingpages=1 \tracingonline=1 \ignoreprimitiveerror=1
\vsize=60pt \topskip=0pt \maxdepth=0pt
\splittopskip=0pt \splitmaxdepth=0pt
\count1=1000 \dimen1=25pt \skip1=0pt
\output={\shipout\vbox{\unvbox255\ifvoid1\else\box1\fi}}
\hrule height4pt width8pt
\insert1{\hrule height8pt width8pt \vskip2pt minus1fil
\hrule height8pt width8pt \vskip4pt minus2fill
\hrule height8pt width8pt}
\penalty-10000 \end";
let mut host = Host::default();
native(s, &mut host).unwrap();
let records: Vec<_> = host
.lines
.iter()
.map(|(destination, text)| (*destination, text.trim()))
.filter(|(_, text)| {
text.starts_with("%% goal height=")
|| text.starts_with("ignored:")
|| text.starts_with("% split")
})
.collect();
const IGNORED: &str = "ignored: Infinite glue shrinkage found in box being split";
assert_eq!(
records,
[
(WriteDestination::TerminalAndLog, "%% goal height=60.0, max depth=0.0"),
(WriteDestination::Log, IGNORED),
(WriteDestination::Log, IGNORED),
(WriteDestination::TerminalAndLog, "% split1 to 25.0,18.0 p=0"),
(WriteDestination::TerminalAndLog, "%% goal height=60.0, max depth=0.0"),
]
);
}
#[test]
fn page_diagnostic_sink_failures_and_capacity_errors_do_not_become_success() {
let s = format!(r"{HEADER}\vsize=20pt\tracingpages=1\copy0\vskip2pt\copy0\end");