Skip to content

Commit 61bd6be

Browse files
committed
Add failing test for synchronized group folder exceptions
1 parent 11919c1 commit 61bd6be

3 files changed

Lines changed: 44 additions & 1 deletion

File tree

Tests/SelectiveTestingTests/ExampleProject/ExampleProject.xcodeproj/project.pbxproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,14 @@
9999
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
100100
membershipExceptions = (
101101
Path/ExceptionView.swift,
102+
Path/ExcludedFolder,
102103
);
103104
target = 276DB5BA29B144C900E5C615 /* ExampleProject */;
104105
};
105106
/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */
106107

107108
/* Begin PBXFileSystemSynchronizedRootGroup section */
108-
095EE0952DB8E35400EACE2E /* DeepFolder */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (095D76502FD30A2E007174DE /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = DeepFolder; sourceTree = "<group>"; };
109+
095EE0952DB8E35400EACE2E /* DeepFolder */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (095D76502FD30A2E007174DE /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (Path/ExcludedFolder, ); path = DeepFolder; sourceTree = "<group>"; };
109110
/* End PBXFileSystemSynchronizedRootGroup section */
110111

111112
/* Begin PBXFrameworksBuildPhase section */
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import SwiftUI
2+
3+
struct ExcludedFolderView: View {
4+
var body: some View {
5+
EmptyView()
6+
}
7+
}

Tests/SelectiveTestingTests/SelectiveTestingProjectTests.swift

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,24 @@ struct SelectiveTestingProjectTests {
151151
#expect(result == Set<TargetIdentity>())
152152
}
153153

154+
@Test
155+
func projectDeepFolderMembershipExceptionFolderChange_turbo() async throws {
156+
// given
157+
let testTool = try IntegrationTestTool()
158+
defer { try? testTool.tearDown() }
159+
160+
let tool = try testTool.createSUT(config: nil,
161+
basePath: "ExampleProject.xcodeproj",
162+
turbo: true)
163+
164+
// when
165+
try testTool.changeFile(at: testTool.projectPath + "ExampleProject/DeepFolder/Path/ExcludedFolder/ExcludedFolderView.swift")
166+
167+
// then
168+
let result = try await tool.run()
169+
#expect(result == Set<TargetIdentity>())
170+
}
171+
154172
@Test
155173
func projectTargetDependencyChange_turbo() async throws {
156174
// given
@@ -211,6 +229,23 @@ struct SelectiveTestingProjectTests {
211229
#expect(result == Set<TargetIdentity>())
212230
}
213231

232+
@Test
233+
func projectDeepFolderMembershipExceptionFolderChange() async throws {
234+
// given
235+
let testTool = try IntegrationTestTool()
236+
defer { try? testTool.tearDown() }
237+
238+
let tool = try testTool.createSUT(config: nil,
239+
basePath: "ExampleProject.xcodeproj")
240+
241+
// when
242+
try testTool.changeFile(at: testTool.projectPath + "ExampleProject/DeepFolder/Path/ExcludedFolder/ExcludedFolderView.swift")
243+
244+
// then
245+
let result = try await tool.run()
246+
#expect(result == Set<TargetIdentity>())
247+
}
248+
214249
@Test
215250
func projectLocalizedPathChange() async throws {
216251
// given

0 commit comments

Comments
 (0)