From 1caf53f40bf1a4f40ff7c78beb7d705e161a485a Mon Sep 17 00:00:00 2001 From: aiongg Date: Fri, 16 Oct 2026 03:32:00 +0000 Subject: [PATCH] Integration: keep-lines IDML tests expect the split main's frame gives The merge took main's 236 pt test frame (19 lines whatever the last line's descent) with next's 7/3 expectations, which belong to next's 240 pt frame. With main's frame the paragraph splits 6/4, as main's tests said. --- crates/engine/src/tests_idml.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/engine/src/tests_idml.rs b/crates/engine/src/tests_idml.rs index 97ca5ab1c..16dff6267 100644 --- a/crates/engine/src/tests_idml.rs +++ b/crates/engine/src/tests_idml.rs @@ -148,14 +148,13 @@ fn para_lines_per_frame(d: &Document, para: usize) -> Vec { } /// Keep Lines Together without a mode in the IDML: InDesign's default, at start/end of paragraph. -/// A 10-line paragraph starting 7 lines above the first frame's bottom (the last baseline may sit -/// on the bottom edge) splits 7/3. +/// A 10-line paragraph starting 6 lines above the first frame's bottom splits 6/4. #[test] fn idml_keep_lines_without_mode_split_at_start_and_end() { let keep = r#"KeepLinesTogether="true" KeepFirstLines="2" KeepLastLines="2""#; let d = designcraft_idml::import_idml(&keep_lines_idml(keep, &[13, 10, 2])).unwrap(); assert_eq!(para_lines_per_frame(&d, 0), [13, 0]); - assert_eq!(para_lines_per_frame(&d, 1), [7, 3]); + assert_eq!(para_lines_per_frame(&d, 1), [6, 4]); // All lines in paragraph, written explicitly: the paragraph moves whole. let d = designcraft_idml::import_idml(&keep_lines_idml(&format!(r#"{keep} KeepAllLinesTogether="true""#), &[13, 10, 2])).unwrap(); assert_eq!(para_lines_per_frame(&d, 1), [0, 10]); @@ -175,7 +174,7 @@ fn format_1_keep_lines_without_mode_lays_out_all_lines() { let v1 = designcraft_format::load(&w.finish().unwrap().into_inner()).unwrap(); assert_eq!(para_lines_per_frame(&v1, 1), [0, 10]); let now = designcraft_format::load(&designcraft_format::save(&d).unwrap()).unwrap(); - assert_eq!(para_lines_per_frame(&now, 1), [7, 3]); + assert_eq!(para_lines_per_frame(&now, 1), [6, 4]); } #[test]