From 9921eea184b3a31fde92a5f3c3cd8c64d30455ac Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Wed, 18 Nov 2026 02:02:35 -0500 Subject: [PATCH] test: make reused PPTX picture reading order explicit --- crates/export/src/pptx/tests.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/export/src/pptx/tests.rs b/crates/export/src/pptx/tests.rs index 7bec277037..d703c682f3 100644 --- a/crates/export/src/pptx/tests.rs +++ b/crates/export/src/pptx/tests.rs @@ -426,6 +426,9 @@ fn pptx_bounds_distinct_pictures_and_reuses_media_across_slides() { let mut first = sample_page(); let one = first.images[0].clone(); first.images = (0..crate::as_docx::MAX_MEDIA).map(|_| Image { bytes: one.bytes.as_ref().to_vec().into(), ..one.clone() }).collect(); + // Media names follow reading order, not the input vector. Give the reused picture a + // distinct top edge so it is unambiguously image1 rather than tying every rectangle. + first.images[0].rect[3] += 1.0; let mut second = sample_page(); second.images = vec![first.images[0].clone(), Image { bytes: one.bytes.as_ref().to_vec().into(), ..one.clone() }, Image { bytes: Vec::new().into(), ..one }];