From 4bbc351c6be1444b04ab35e7116418dc30a7edbe Mon Sep 17 00:00:00 2001 From: Danny McClanahan <1305167+cosmicexplorer@users.noreply.github.com> Date: Tue, 20 Aug 2024 16:07:00 -0400 Subject: [PATCH] add repro_old423 test for pipelining --- tests/repro_old423.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/repro_old423.rs b/tests/repro_old423.rs index 83adf950b..1e11419f8 100644 --- a/tests/repro_old423.rs +++ b/tests/repro_old423.rs @@ -10,3 +10,18 @@ fn repro_old423() -> zip::result::ZipResult<()> { let mut archive = ZipArchive::new(io::Cursor::new(v)).expect("couldn't open test zip file"); archive.extract(TempDir::new("repro_old423")?) } + +#[cfg(all(unix, feature = "parallelism", feature = "_deflate-any"))] +#[test] +fn repro_old423_pipelined() -> zip::result::ZipResult<()> { + use std::{fs, path::Path}; + use tempdir::TempDir; + use zip::{read::split_extract, ZipArchive}; + + let path = Path::new(env!("CARGO_MANIFEST_DIR")).join("tests/data/lin-ub_iwd-v11.zip"); + let file = fs::File::open(path)?; + let archive = ZipArchive::new(file)?; + let td = TempDir::new("repro_old423")?; + split_extract(&archive, td.path(), Default::default()).expect("couldn't extract test zip"); + Ok(()) +}