File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,25 @@ exports['updateProductName function'] = {
155155 }
156156}
157157
158+ exports [ 'updateBuildProperty function' ] = {
159+ setUp :function ( callback ) {
160+ callback ( ) ;
161+ } ,
162+ tearDown :function ( callback ) {
163+ fs . writeFileSync ( bcpbx , original_pbx , 'utf-8' ) ;
164+ callback ( ) ;
165+ } ,
166+ 'should change build properties in the .pbxproj file' : function ( test ) {
167+ var myProj = new pbx ( 'test/parser/projects/build-config.pbxproj' ) ;
168+ myProj . parse ( function ( err , hash ) {
169+ myProj . updateBuildProperty ( 'TARGETED_DEVICE_FAMILY' , '"arm"' ) ;
170+ var newContents = myProj . writeSync ( ) ;
171+ test . ok ( newContents . match ( / T A R G E T E D _ D E V I C E _ F A M I L Y \s * = \s * " a r m " / ) ) ;
172+ test . done ( ) ;
173+ } ) ;
174+ }
175+ }
176+
158177exports [ 'productName field' ] = {
159178 'should return the product name' : function ( test ) {
160179 var newProj = new pbx ( '.' ) ;
You can’t perform that action at this time.
0 commit comments