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

@@ -162,6 +162,26 @@ fn legal_breaks_costs_ties_and_forced_stops_match_actual_initex() {
compare(&cases);
}
#[test]
fn ignored_split_shrink_changes_only_glue_visited_by_vertical_break() {
let cases = [
format!(
r"\ignoreprimitiveerror=3\splittopskip=0pt\splitmaxdepth=0pt\setbox1=\vbox{{\hrule width8pt height8pt\marks3{{FIRST}}\vskip2pt minus1fil\hrule width8pt height8pt\leaders\hrule width4pt height1pt\vskip4pt minus2fill\marks3{{LAST}}\hrule width8pt height8pt}}\setbox0=\vsplit1 to29pt{}",
observe(r"MASK:\the\ignoreprimitiveerror/\splitfirstmarks3/\splitbotmarks3")
),
r"\ignoreprimitiveerror=1\setbox1=\vbox{\baselineskip=12pt minus1fil\hbox{A}\hbox{B}}\setbox0=\vsplit1 to18pt".into(),
r"\ignoreprimitiveerror=2\splittopskip=0pt\setbox1=\vbox{\hrule width8pt height8pt\penalty-10000\hrule width8pt height8pt\vskip4pt minus2fill\hrule width8pt height8pt}\setbox0=\vsplit1 to8pt".into(),
];
let execution = compare(&cases);
assert!(execution
.reads
.contains(&Dependency::Parameter(Parameter::Ignoreprimitiveerror)));
assert_eq!(
execution.state.parameter(Parameter::Ignoreprimitiveerror).width(),
0
);
}
#[test]
fn split_marks_are_global_expanded_tokens_per_class_and_clear_on_void() {
let mut cases = Vec::new();
@@ -282,6 +302,7 @@ fn invalid_split_modes_classes_glue_and_real_capacity_fail_explicitly() {
r"\marks32768{A}",
r"\message{\splitfirstmarks32768}",
r"\setbox1=\vbox{\hbox{A}\vskip0pt minus1fil\hbox{B}}\setbox0=\vsplit1 to100pt",
r"\ignoreprimitiveerror=2\setbox1=\vbox{\hbox{A}\vskip0pt minus1fil\hbox{B}}\setbox0=\vsplit1 to100pt",
r"\setbox1=\vbox{\hbox{A}}$a^\vsplit1 to5pt$",
r"\hbox{\discretionary{\mark{A}}{}{}}",
r"\hbox{\discretionary{}{\marks1{B}}{}}",