Rm read::stream::test::zip_contents

As streaming mode cannot calculate central_header_start.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2022-07-22 19:14:28 +10:00 committed by Marli Frost
parent 89ff32d93b
commit f97f017d99

View file

@ -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!(