@@ -122,11 +122,61 @@ exports.addBuildPhase = {
122122 test . deepEqual ( initialFileReferenceSectionItemsCount . length , afterAdditionBuildFileSectionItemsCount . length - 2 ) ;
123123 test . done ( ) ;
124124 } ,
125+ 'should set target to Wrapper given \'application\' as target' : function ( test ) {
126+ var buildPhase = proj . addBuildPhase ( [ 'file.m' ] , 'PBXCopyFilesBuildPhase' , 'Copy Files' , proj . getFirstTarget ( ) . uuid , 'application' ) . buildPhase ;
127+ test . equal ( buildPhase . dstSubfolderSpec , 1 ) ;
128+ test . done ( ) ;
129+ } ,
130+ 'should set target to Plugins given \'app_extension\' as target' : function ( test ) {
131+ var buildPhase = proj . addBuildPhase ( [ 'file.m' ] , 'PBXCopyFilesBuildPhase' , 'Copy Files' , proj . getFirstTarget ( ) . uuid , 'app_extension' ) . buildPhase ;
132+ test . equal ( buildPhase . dstSubfolderSpec , 13 ) ;
133+ test . done ( ) ;
134+ } ,
135+ 'should set target to Wapper given \'bundle\' as target' : function ( test ) {
136+ var buildPhase = proj . addBuildPhase ( [ 'file.m' ] , 'PBXCopyFilesBuildPhase' , 'Copy Files' , proj . getFirstTarget ( ) . uuid , 'bundle' ) . buildPhase ;
137+ test . equal ( buildPhase . dstSubfolderSpec , 1 ) ;
138+ test . done ( ) ;
139+ } ,
140+ 'should set target to Wapper given \'command_line_tool\' as target' : function ( test ) {
141+ var buildPhase = proj . addBuildPhase ( [ 'file.m' ] , 'PBXCopyFilesBuildPhase' , 'Copy Files' , proj . getFirstTarget ( ) . uuid , 'command_line_tool' ) . buildPhase ;
142+ test . equal ( buildPhase . dstSubfolderSpec , 1 ) ;
143+ test . done ( ) ;
144+ } ,
145+ 'should set target to Products Directory given \'dynamic_library\' as target' : function ( test ) {
146+ var buildPhase = proj . addBuildPhase ( [ 'file.m' ] , 'PBXCopyFilesBuildPhase' , 'Copy Files' , proj . getFirstTarget ( ) . uuid , 'dynamic_library' ) . buildPhase ;
147+ test . equal ( buildPhase . dstSubfolderSpec , 16 ) ;
148+ test . done ( ) ;
149+ } ,
150+ 'should set target to Shared Framework given \'framework\' as target' : function ( test ) {
151+ var buildPhase = proj . addBuildPhase ( [ 'file.m' ] , 'PBXCopyFilesBuildPhase' , 'Copy Files' , proj . getFirstTarget ( ) . uuid , 'framework' ) . buildPhase ;
152+ test . equal ( buildPhase . dstSubfolderSpec , 11 ) ;
153+ test . done ( ) ;
154+ } ,
125155 'should set target to Frameworks given \'frameworks\' as target' : function ( test ) {
126156 var buildPhase = proj . addBuildPhase ( [ 'file.m' ] , 'PBXCopyFilesBuildPhase' , 'Copy Files' , proj . getFirstTarget ( ) . uuid , 'frameworks' ) . buildPhase ;
127157 test . equal ( buildPhase . dstSubfolderSpec , 10 ) ;
128158 test . done ( ) ;
129159 } ,
160+ 'should set target to Products Directory given \'static_library\' as target' : function ( test ) {
161+ var buildPhase = proj . addBuildPhase ( [ 'file.m' ] , 'PBXCopyFilesBuildPhase' , 'Copy Files' , proj . getFirstTarget ( ) . uuid , 'static_library' ) . buildPhase ;
162+ test . equal ( buildPhase . dstSubfolderSpec , 16 ) ;
163+ test . done ( ) ;
164+ } ,
165+ 'should set target to Wrapper given \'unit_test_bundle\' as target' : function ( test ) {
166+ var buildPhase = proj . addBuildPhase ( [ 'file.m' ] , 'PBXCopyFilesBuildPhase' , 'Copy Files' , proj . getFirstTarget ( ) . uuid , 'unit_test_bundle' ) . buildPhase ;
167+ test . equal ( buildPhase . dstSubfolderSpec , 1 ) ;
168+ test . done ( ) ;
169+ } ,
170+ 'should set target to Wrapper given \'watch_app\' as target' : function ( test ) {
171+ var buildPhase = proj . addBuildPhase ( [ 'file.m' ] , 'PBXCopyFilesBuildPhase' , 'Copy Files' , proj . getFirstTarget ( ) . uuid , 'watch_app' ) . buildPhase ;
172+ test . equal ( buildPhase . dstSubfolderSpec , 1 ) ;
173+ test . done ( ) ;
174+ } ,
175+ 'should set target to Plugins given \'watch_extension\' as target' : function ( test ) {
176+ var buildPhase = proj . addBuildPhase ( [ 'file.m' ] , 'PBXCopyFilesBuildPhase' , 'Copy Files' , proj . getFirstTarget ( ) . uuid , 'watch_extension' ) . buildPhase ;
177+ test . equal ( buildPhase . dstSubfolderSpec , 13 ) ;
178+ test . done ( ) ;
179+ } ,
130180 'should add a script build phase to echo "hello world!"' : function ( test ) {
131181 var options = { shellPath : '/bin/sh' , shellScript : 'echo "hello world!"' } ;
132182 var buildPhase = proj . addBuildPhase ( [ ] , 'PBXShellScriptBuildPhase' , 'Run a script' , proj . getFirstTarget ( ) . uuid , options ) . buildPhase ;
0 commit comments