test: Fix end-to-end test

This commit is contained in:
Chris Hennick 2024-05-02 13:24:50 -07:00
parent 84ae5fc157
commit b520c7f517
No known key found for this signature in database
GPG key ID: DA47AABA4961C509

View file

@ -2,6 +2,7 @@ use std::collections::HashSet;
use std::io::prelude::*;
use std::io::Cursor;
use zip::result::ZipResult;
use zip::unstable::LittleEndianWriteExt;
use zip::write::ExtendedFileOptions;
use zip::write::FileOptions;
use zip::write::SimpleFileOptions;
@ -158,8 +159,8 @@ fn check_test_archive<R: Read + Seek>(zip_file: R) -> ZipResult<zip::ZipArchive<
{
let file_with_extra_data = archive.by_name("test_with_extra_data/🐢.txt")?;
let mut extra_data = Vec::new();
extra_data.write_u16(0xbeef)?;
extra_data.write_u16(EXTRA_DATA.len() as u16)?;
extra_data.write_u16_le(0xbeef)?;
extra_data.write_u16_le(EXTRA_DATA.len() as u16)?;
extra_data.write_all(EXTRA_DATA)?;
assert_eq!(
file_with_extra_data.extra_data(),