Skip to content

Commit cf85270

Browse files
AlexNsbmrclaude
andcommitted
Update test: expect individual file paths instead of directory names in exceptions
Xcode does not recursively exclude directory contents from membershipExceptions, so the correct behavior is to list individual files rather than directory names. Co-Authored-By: Claude Opus 4.6 <[email protected]>
1 parent 494fc9e commit cf85270

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Tests/XcodeGenKitTests/SourceGeneratorTests.swift

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ class SourceGeneratorTests: XCTestCase {
415415
try expect(exceptions.contains("Nested/b.swift")) == false
416416
}
417417

418-
$0.it("excludes entire subdirectory as single exception when no files in it are included") {
418+
$0.it("excludes individual files in subdirectory when no files in it are included") {
419419
let directories = """
420420
Sources:
421421
- a.swift
@@ -436,10 +436,11 @@ class SourceGeneratorTests: XCTestCase {
436436
let exceptionSet = try unwrap(syncedFolder.exceptions?.first as? PBXFileSystemSynchronizedBuildFileExceptionSet)
437437
let exceptions = try unwrap(exceptionSet.membershipExceptions)
438438

439-
// The whole directory should be a single exception entry, not each file within it
440-
try expect(exceptions.contains("ExcludedDir")) == true
441-
try expect(exceptions.contains("ExcludedDir/x.swift")) == false
442-
try expect(exceptions.contains("ExcludedDir/y.swift")) == false
439+
// Xcode does not recursively exclude directory contents from membershipExceptions,
440+
// so individual files must be listed instead of the directory name
441+
try expect(exceptions.contains("ExcludedDir")) == false
442+
try expect(exceptions.contains("ExcludedDir/x.swift")) == true
443+
try expect(exceptions.contains("ExcludedDir/y.swift")) == true
443444
try expect(exceptions.contains("a.swift")) == false
444445
}
445446

0 commit comments

Comments
 (0)