Skip to content

Commit 380ed38

Browse files
authored
Merge pull request #1827 from ahoppen/restrict-directory-search
2 parents c23b4ff + a2bf954 commit 380ed38

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

Tests/SourceKitLSPTests/BackgroundIndexingTests.swift

+10-4
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,11 @@ final class BackgroundIndexingTests: XCTestCase {
245245
)
246246

247247
let dependencyUrl = try XCTUnwrap(
248-
FileManager.default.findFiles(named: "MyDependency.swift", in: project.scratchDirectory).only
248+
FileManager.default.findFiles(
249+
named: "MyDependency.swift",
250+
in: project.scratchDirectory.appendingPathComponent(".build").appendingPathComponent("index-build")
251+
.appendingPathComponent("checkouts")
252+
).only
249253
)
250254
let dependencyUri = DocumentURI(dependencyUrl)
251255
let testFileUri = try project.uri(for: "Test.swift")
@@ -1256,9 +1260,11 @@ final class BackgroundIndexingTests: XCTestCase {
12561260
try await project.testClient.send(PollIndexRequest())
12571261
project.testClient.send(
12581262
DidChangeWatchedFilesNotification(
1259-
changes: FileManager.default.findFiles(named: "Dependency.swift", in: project.scratchDirectory).map {
1260-
FileEvent(uri: DocumentURI($0), type: .changed)
1261-
}
1263+
changes: FileManager.default.findFiles(
1264+
named: "Dependency.swift",
1265+
in: project.scratchDirectory.appendingPathComponent(".build").appendingPathComponent("index-build")
1266+
.appendingPathComponent("checkouts")
1267+
).map { FileEvent(uri: DocumentURI($0), type: .changed) }
12621268
)
12631269
)
12641270

0 commit comments

Comments
 (0)