Skip to content

Commit

Permalink
add repro_old423 test for pipelining
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmicexplorer committed Aug 20, 2024
1 parent 366282c commit 4bbc351
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/repro_old423.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
}

0 comments on commit 4bbc351

Please sign in to comment.