Skip to content

Commit 2d41fa0

Browse files
committed
tests: add a workaround for SPM tests
The path representation in `AbsolutePath` is incorrect and stores a relative path as an absolute path (paths with leading `/` or `\` are *drive* relative, not absolute, absolute paths must start with `[A-Z]:` or `\\[^\]+\[^\]+\`). This adds a root directory so that the path to the manifest is not drive relative.
1 parent 76f291b commit 2d41fa0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Tests/WorkspaceTests/SourceControlPackageContainerTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ class SourceControlPackageContainerTests: XCTestCase {
328328
func testPreReleaseVersions() throws {
329329
let fs = InMemoryFileSystem()
330330

331-
let repoPath = AbsolutePath.root
331+
let repoPath = AbsolutePath.root.appending("SourceCache")
332332
let filePath = repoPath.appending("Package.swift")
333333

334334
let specifier = RepositorySpecifier(path: repoPath)

0 commit comments

Comments
 (0)