Skip to content

Commit f7d28f0

Browse files
tristanlabellecompnerd
authored andcommitted
Don't assume that the temporary directory doesn't include symlinks
1 parent d492bb1 commit f7d28f0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Tests/Foundation/Tests/TestURL.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ class TestURL : XCTestCase {
559559

560560
let url = URL(fileURLWithPath: "foo/bar/baz")
561561
let result = url.resolvingSymlinksInPath()
562-
XCTAssertEqual(result, URL(fileURLWithPath: writableTestDirectoryURL.path + "/foo/bar/baz"))
562+
XCTAssertEqual(result, URL(fileURLWithPath: writableTestDirectoryURL.path + "/foo/bar/baz").resolvingSymlinksInPath())
563563
}
564564

565565
func test_resolvingSymlinksInPathShouldAppendTrailingSlashWhenExistingDirectory() throws {
@@ -573,7 +573,7 @@ class TestURL : XCTestCase {
573573
}
574574
let url = URL(fileURLWithPath: path)
575575
let result = url.resolvingSymlinksInPath()
576-
XCTAssertEqual(result, URL(fileURLWithPath: path + "/"))
576+
XCTAssertEqual(result, URL(fileURLWithPath: path + "/").resolvingSymlinksInPath())
577577
}
578578

579579
func test_resolvingSymlinksInPathShouldResolveSymlinks() throws {
@@ -588,7 +588,7 @@ class TestURL : XCTestCase {
588588
try fileManager.createSymbolicLink(at: symbolicLink, withDestinationURL: destination)
589589

590590
let result = symbolicLink.resolvingSymlinksInPath()
591-
XCTAssertEqual(result, URL(fileURLWithPath: writableTestDirectoryURL.path + "/destination"))
591+
XCTAssertEqual(result, URL(fileURLWithPath: writableTestDirectoryURL.path + "/destination").resolvingSymlinksInPath())
592592
}
593593

594594
func test_resolvingSymlinksInPathShouldRemovePrivatePrefix() {

0 commit comments

Comments
 (0)