Report active native math alignment and output lists

This commit is contained in:
gloamxun committed 2026-11-21 06:26:49 +08:00
1 parent 3ed2c2cd54
commit d02777a1fc
12 files changed
+779 -199

No files matched your search

+34
View File
@@ -295,3 +295,37 @@ fn automatic_kerns_preserve_raw_ligature_and_hyphen_margin_order() {
fs::remove_dir_all(root).unwrap();
fs::remove_dir_all(oracle).unwrap();
}
#[test]
fn redirected_showlists_preserves_live_nested_math_alignment_and_output() {
let root = directory();
let oracle = directory();
let entry = "activity.tex";
let input = r"\catcode37=14 \catcode38=4
\input math-fonts
\pdfoutput=1
\immediate\openout3=lists.dat \showstream=3
\showboxbreadth=30 \showboxdepth=10
\setbox0=\vbox{\halign{#&\hfil#\cr
A&
\hbox{$x_i^2+{a\over b}\showlists$}\cr}}
\vsize=14pt \output={\showlists\shipout\box255}
\hrule height10pt width4pt
\vskip2pt \penalty-10000
\immediate\closeout3 \end";
let fonts = include_bytes!("../examples/native-bootstrap/math-fonts.tex");
for path in [&root, &oracle] {
fs::write(path.join(entry), input).unwrap();
fs::write(path.join("math-fonts.tex"), fonts).unwrap();
}
let expected = reference(&oracle, entry);
let actual = native(&root, entry);
assert!(expected.status.success(), "{expected:?}");
assert!(actual.status.success(), "{actual:?}");
assert_eq!(
fs::read_to_string(root.join("lists.dat")).unwrap(),
fs::read_to_string(oracle.join("lists.dat")).unwrap()
);
fs::remove_dir_all(root).unwrap();
fs::remove_dir_all(oracle).unwrap();
}