Merge native paragraph break candidates at the TeX line boundary

This commit is contained in:
gloamxun committed 2026-11-28 10:21:53 +08:00
1 parent 509f229a52
commit a864c6c5ca
3 files changed
+66 -9

No files matched your search

@@ -127,6 +127,26 @@ fn real_passes_feasible_edges_passive_nodes_and_short_lists_match_tex() {
}
}
}
#[test]
fn ragged_shaped_paragraphs_preserve_pdftex_ties_at_the_last_special_line() {
for geometry in [
r"\hangindent=26pt\hangafter=1",
r"\hangindent=26pt\hangafter=-1",
r"\parshape=2 0pt 91pt 26pt 65pt",
r"\prevgraf=1\hangindent=26pt\hangafter=2",
] {
let source = format!(
r"{HEADER}\hsize=91pt\rightskip=0pt plus1fil\linepenalty=10\pretolerance=100\noindent {geometry} aaaa bbbb cccc dddd eeee ffff\par\end"
);
let execution = native(&source);
let reports = reports(&execution);
assert_eq!(reports.len(), 1);
assert_eq!(reports[0].text.trim_end(), reference(&source), "{geometry}");
assert_selected_path(reports[0], &execution);
}
}
fn assert_selected_path(r: &ParagraphTraceReport, e: &Execution) {
use std::collections::BTreeMap;
let mut active = BTreeMap::<usize, (usize, usize, usize, i64)>::new();