compatibility with empty zip files

This commit is contained in:
Antoine Cœur
2017-10-07 13:01:07 +08:00
parent 27cf1ec538
commit 2ab252766d
5 changed files with 48 additions and 29 deletions
@@ -313,6 +313,14 @@
XCTAssertTrue(unicodeFolderWasExtracted, @"Folders with names in unicode should be extracted propertly.");
}
- (void)testUnzippingEmptyArchive {
NSString *zipPath = [[NSBundle bundleForClass:[self class]] pathForResource:@"Empty" ofType:@"zip"];
NSString *outputPath = [self _cachesPath:@"Empty"];
BOOL success = [SSZipArchive unzipFileAtPath:zipPath toDestination:outputPath delegate:nil];
XCTAssertTrue(success);
}
- (void)testZippingAndUnzippingForDate {