Skip to content

Commit

Permalink
Merge pull request swiftlang#1827 from ahoppen/restrict-directory-search
Browse files Browse the repository at this point in the history
  • Loading branch information
ahoppen authored Nov 16, 2024
2 parents c23b4ff + a2bf954 commit 380ed38
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions Tests/SourceKitLSPTests/BackgroundIndexingTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,11 @@ final class BackgroundIndexingTests: XCTestCase {
)

let dependencyUrl = try XCTUnwrap(
FileManager.default.findFiles(named: "MyDependency.swift", in: project.scratchDirectory).only
FileManager.default.findFiles(
named: "MyDependency.swift",
in: project.scratchDirectory.appendingPathComponent(".build").appendingPathComponent("index-build")
.appendingPathComponent("checkouts")
).only
)
let dependencyUri = DocumentURI(dependencyUrl)
let testFileUri = try project.uri(for: "Test.swift")
Expand Down Expand Up @@ -1256,9 +1260,11 @@ final class BackgroundIndexingTests: XCTestCase {
try await project.testClient.send(PollIndexRequest())
project.testClient.send(
DidChangeWatchedFilesNotification(
changes: FileManager.default.findFiles(named: "Dependency.swift", in: project.scratchDirectory).map {
FileEvent(uri: DocumentURI($0), type: .changed)
}
changes: FileManager.default.findFiles(
named: "Dependency.swift",
in: project.scratchDirectory.appendingPathComponent(".build").appendingPathComponent("index-build")
.appendingPathComponent("checkouts")
).map { FileEvent(uri: DocumentURI($0), type: .changed) }
)
)

Expand Down

0 comments on commit 380ed38

Please sign in to comment.