From 53b8fda93ff1043e6058b484759125f76a6d2a6c Mon Sep 17 00:00:00 2001 From: aiongg Date: Fri, 16 Oct 2026 14:02:18 +0000 Subject: [PATCH] Integration: #2532 save the structure-tree test without object streams The default save packs annotation dictionaries into compressed object streams, so the URL and comment-text byte checks passed without the fix. --- crates/redact/src/tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/redact/src/tests.rs b/crates/redact/src/tests.rs index f9e08d35d0..5ce914b983 100644 --- a/crates/redact/src/tests.rs +++ b/crates/redact/src/tests.rs @@ -661,7 +661,7 @@ fn removed_links_and_comments_leave_the_structure_tree_and_the_saved_file() { let mut doc = pdf(objs); let done = remove_hidden(&mut doc, &[Hidden::LinksActionsScripts, Hidden::Comments]).unwrap(); assert!(done.contains(&(Hidden::LinksActionsScripts, 1)) && done.contains(&(Hidden::Comments, 1)), "{done:?}"); - let bytes = write_full(&doc, &SaveOptions::default()).unwrap(); + let bytes = write_full(&doc, &SaveOptions { object_streams: false, ..SaveOptions::default() }).unwrap(); let has = |needle: &[u8]| bytes.windows(needle.len()).any(|w| w == needle); assert!(!has(b"secret.example"), "the removed link's URL survived the save"); assert!(!has(b"COMMENTSECRETNOTE"), "the removed comment's text survived the save");