File tree Expand file tree Collapse file tree 2 files changed +46
-0
lines changed
tools/generators/files_and_groups Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,19 @@ extension ElementCreator.CreateGroupChild {
105105 )
106106 )
107107
108+ case " xcmappingmodel " :
109+ return . elementAndChildren(
110+ createFile (
111+ name: name,
112+ bazelPath: BazelPath (
113+ parent: parentBazelPath,
114+ path: name
115+ ) ,
116+ bazelPathType: parentBazelPathType,
117+ transitiveBazelPaths: [ ]
118+ )
119+ )
120+
108121 default :
109122 return . elementAndChildren(
110123 createGroup (
Original file line number Diff line number Diff line change @@ -497,4 +497,37 @@ final class CreateFileElementTests: XCTestCase {
497497 )
498498 XCTAssertEqual ( result. resolvedRepository, stubbedResolvedRepository)
499499 }
500+
501+ func test_element_content_explicitFileType_xcmappingmodel( ) {
502+ // Arrange
503+
504+ let name = " Mapping.xcmappingmodel "
505+ let ext = " xcmappingmodel "
506+ let bazelPath = BazelPath ( " a/bazel/path/Mapping.xcmappingmodel " )
507+ let createAttributes = ElementCreator . CreateAttributes. stub (
508+ elementAttributes: ElementAttributes (
509+ sourceTree: . group, name: nil , path: " a_path "
510+ ) ,
511+ resolvedRepository: nil
512+ )
513+
514+ let expectedContent = #"""
515+ {isa = PBXFileReference; explicitFileType = wrapper.xcmappingmodel; path = a_path; sourceTree = "<group>"; }
516+ """#
517+
518+ // Act
519+
520+ let result = ElementCreator . CreateFileElement. defaultCallable (
521+ name: name,
522+ ext: ext,
523+ bazelPath: bazelPath,
524+ bazelPathType: . workspace,
525+ createAttributes: createAttributes,
526+ createIdentifier: ElementCreator . Stubs. createIdentifier
527+ )
528+
529+ // Assert
530+
531+ XCTAssertEqual ( result. element. object. content, expectedContent)
532+ }
500533}
You can’t perform that action at this time.
0 commit comments