Skip to content

Commit 8e1be8b

Browse files
committed
Fix Linux compile
1 parent 58b0de9 commit 8e1be8b

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

Tests/DocUploadBundleTests/ZipTests.swift

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,29 +22,29 @@ final class ZipTests: XCTestCase {
2222
func test_zip() async throws {
2323
// Test basic zip behaviour we expect from the library we use
2424
try await withTempDir { tempDir in
25-
let tempURL = URL(filePath: tempDir)
26-
let fileA = tempURL.appending(path: "a.txt")
27-
let fileB = tempURL.appending(path: "b.txt")
25+
let tempURL = URL(fileURLWithPath: tempDir)
26+
let fileA = tempURL.appendingPathComponent("a.txt")
27+
let fileB = tempURL.appendingPathComponent("b.txt")
2828
try "a".write(to: fileA, atomically: true, encoding: .utf8)
2929
try "b".write(to: fileB, atomically: true, encoding: .utf8)
30-
let zipFile = tempURL.appending(path: "out.zip")
30+
let zipFile = tempURL.appendingPathComponent("out.zip")
3131
try Zipping.zip(paths: [fileA, fileB], to: zipFile)
32-
XCTAssert(FileManager.default.fileExists(atPath: zipFile.path()))
32+
XCTAssert(FileManager.default.fileExists(atPath: zipFile.path))
3333
}
3434
}
3535

3636
func test_unzip() async throws {
3737
// Test basic unzip behaviour we expect from the library we use
3838
try await withTempDir { tempDir in
39-
let tempURL = URL(filePath: tempDir)
39+
let tempURL = URL(fileURLWithPath: tempDir)
4040
let zipFile = fixtureUrl(for: "out.zip")
41-
let outDir = tempURL.appending(path: "out")
41+
let outDir = tempURL.appendingPathComponent("out")
4242
try Zipping.unzip(from: zipFile, to: outDir)
43-
XCTAssert(FileManager.default.fileExists(atPath: outDir.path()))
44-
let fileA = outDir.appending(path: "a.txt")
45-
let fileB = outDir.appending(path: "b.txt")
46-
XCTAssert(FileManager.default.fileExists(atPath: fileA.path()))
47-
XCTAssert(FileManager.default.fileExists(atPath: fileB.path()))
43+
XCTAssert(FileManager.default.fileExists(atPath: outDir.path))
44+
let fileA = outDir.appendingPathComponent("a.txt")
45+
let fileB = outDir.appendingPathComponent("b.txt")
46+
XCTAssert(FileManager.default.fileExists(atPath: fileA.path))
47+
XCTAssert(FileManager.default.fileExists(atPath: fileB.path))
4848
XCTAssertEqual(try String(contentsOf: fileA), "a")
4949
XCTAssertEqual(try String(contentsOf: fileB), "b")
5050
}

0 commit comments

Comments
 (0)