Skip to content

Fix tests assuming that the temporary directory doesn't include symlinks #4723

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Tests/Foundation/Tests/TestURL.swift
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ class TestURL : XCTestCase {

let url = URL(fileURLWithPath: "foo/bar/baz")
let result = url.resolvingSymlinksInPath()
XCTAssertEqual(result, URL(fileURLWithPath: writableTestDirectoryURL.path + "/foo/bar/baz"))
XCTAssertEqual(result, URL(fileURLWithPath: writableTestDirectoryURL.path + "/foo/bar/baz").resolvingSymlinksInPath())
}

func test_resolvingSymlinksInPathShouldAppendTrailingSlashWhenExistingDirectory() throws {
Expand All @@ -573,7 +573,7 @@ class TestURL : XCTestCase {
}
let url = URL(fileURLWithPath: path)
let result = url.resolvingSymlinksInPath()
XCTAssertEqual(result, URL(fileURLWithPath: path + "/"))
XCTAssertEqual(result, URL(fileURLWithPath: path + "/").resolvingSymlinksInPath())
}

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

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

func test_resolvingSymlinksInPathShouldRemovePrivatePrefix() {
Expand Down