mirror of
https://github.com/tsolomko/SWCompression.git
synced 2026-06-23 14:56:41 +00:00
[Tests] Add a test for opening very short file as a zip
This commit is contained in:
@@ -10,6 +10,10 @@ class ZipTests: XCTestCase {
|
||||
|
||||
private static let testType: String = "zip"
|
||||
|
||||
func testBadFile_short() {
|
||||
XCTAssertThrowsError(try ZipContainer.open(container: Data([0, 1, 2, 3, 4, 5, 6, 7])))
|
||||
}
|
||||
|
||||
func testBadFile_invalid() throws {
|
||||
let testData = try Constants.data(forAnswer: "test6")
|
||||
XCTAssertThrowsError(try ZipContainer.open(container: testData))
|
||||
|
||||
Reference in New Issue
Block a user