From f97f017d995ca2a95b220ec9767953c7bf7730a0 Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Fri, 22 Jul 2022 19:14:28 +1000 Subject: [PATCH] Rm `read::stream::test::zip_contents` As streaming mode cannot calculate central_header_start. Signed-off-by: Jiahao XU --- src/read/stream.rs | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/src/read/stream.rs b/src/read/stream.rs index 3cf174ac..6c1c66c9 100644 --- a/src/read/stream.rs +++ b/src/read/stream.rs @@ -264,33 +264,6 @@ mod test { .unwrap_err(); } - #[test] - fn zip_contents() { - let reader = ZipStreamReader::new(io::Cursor::new(include_bytes!( - "../../tests/data/mimetype.zip" - ))); - - struct V(bool); - impl ZipStreamVisitor for V { - fn visit_file(&mut self, file: &mut ZipFile<'_>) -> ZipResult<()> { - if !self.0 { - self.0 = true; - assert_eq!(file.central_header_start(), 77); - } - - Ok(()) - } - fn visit_additional_metadata( - &mut self, - _metadata: &ZipStreamFileMetadata, - ) -> ZipResult<()> { - Ok(()) - } - } - - reader.visit(&mut V(false)).unwrap(); - } - #[test] fn zip_read_streaming() { let reader = ZipStreamReader::new(io::Cursor::new(include_bytes!(