Perform copy earlier, to catch recent bug
This commit is contained in:
parent
6b4a07f2a7
commit
ed5c76d2e8
1 changed files with 11 additions and 11 deletions
|
@ -103,6 +103,17 @@ fn write_test_archive(file: &mut Cursor<Vec<u8>>, method: CompressionMethod, sha
|
|||
.compression_method(method)
|
||||
.unix_permissions(0o755);
|
||||
|
||||
zip.start_file(ENTRY_NAME, options).unwrap();
|
||||
zip.write_all(LOREM_IPSUM).unwrap();
|
||||
|
||||
if shallow_copy {
|
||||
zip.shallow_copy_file(ENTRY_NAME, INTERNAL_COPY_ENTRY_NAME)
|
||||
.unwrap();
|
||||
} else {
|
||||
zip.deep_copy_file(ENTRY_NAME, INTERNAL_COPY_ENTRY_NAME)
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
zip.start_file("test/☃.txt", options).unwrap();
|
||||
zip.write_all(b"Hello, World!\n").unwrap();
|
||||
|
||||
|
@ -115,17 +126,6 @@ fn write_test_archive(file: &mut Cursor<Vec<u8>>, method: CompressionMethod, sha
|
|||
zip.end_extra_data().unwrap();
|
||||
zip.write_all(b"Hello, World! Again.\n").unwrap();
|
||||
|
||||
zip.start_file(ENTRY_NAME, options).unwrap();
|
||||
zip.write_all(LOREM_IPSUM).unwrap();
|
||||
|
||||
if shallow_copy {
|
||||
zip.shallow_copy_file(ENTRY_NAME, INTERNAL_COPY_ENTRY_NAME)
|
||||
.unwrap();
|
||||
} else {
|
||||
zip.deep_copy_file(ENTRY_NAME, INTERNAL_COPY_ENTRY_NAME)
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
zip.finish().unwrap();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue