Bug fix: expected error result now happens sooner
This commit is contained in:
parent
818a1cc5bb
commit
6d8de51bea
1 changed files with 2 additions and 4 deletions
|
@ -1403,11 +1403,9 @@ mod test {
|
|||
|
||||
#[cfg(feature = "deflate64")]
|
||||
#[test]
|
||||
fn deflate64_not_enough_space() -> std::io::Result<()> {
|
||||
fn deflate64_not_enough_space() {
|
||||
let mut v = Vec::new();
|
||||
v.extend_from_slice(include_bytes!("../tests/data/deflate64_issue_25.zip"));
|
||||
let mut reader = ZipArchive::new(Cursor::new(v))?;
|
||||
std::io::copy(&mut reader.by_index(0)?, &mut std::io::sink()).expect_err("Invalid file");
|
||||
Ok(())
|
||||
ZipArchive::new(Cursor::new(v)).expect_err("Invalid file");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue