@@ -182,22 +182,42 @@ exports.addStaticLibrary = {
182
182
test . equal ( plugins . children . length , 1 ) ;
183
183
test . done ( ) ;
184
184
} ,
185
- 'should add the right LIBRARY_SEARCH_PATHS entry for plugins' : function ( test ) {
186
- plugins = proj . pbxGroupByName ( 'Plugins' ) ;
187
- plugins . path = '"Test200/Plugins"' ;
185
+ 'should add the right LIBRARY_SEARCH_PATHS entry for plugins' : {
186
+ 'with group set' : function ( test ) {
187
+ plugins = proj . pbxGroupByName ( 'Plugins' ) ;
188
+ plugins . path = '"Test200/Plugins"' ;
189
+
190
+ var newFile = proj . addStaticLibrary ( 'Plugins/libGoogleAnalytics.a' ,
191
+ { plugin : true } ) ,
192
+ libraryPaths = librarySearchPaths ( proj ) ,
193
+ expectedPath = '"\\"$(SRCROOT)/Test200/Plugins\\""' ,
194
+ i , current ;
195
+
196
+ for ( i = 0 ; i < libraryPaths . length ; i ++ ) {
197
+ current = libraryPaths [ i ] ;
198
+ test . ok ( current . indexOf ( expectedPath ) >= 0 ,
199
+ expectedPath + ' not found in ' + current ) ;
200
+ }
188
201
189
- var newFile = proj . addStaticLibrary ( 'libGoogleAnalytics.a' ,
190
- { plugin : true } ) ,
191
- libraryPaths = librarySearchPaths ( proj ) ,
192
- expectedPath = '"\\"$(SRCROOT)/Test200/Plugins\\""' ,
193
- i , current ;
202
+ test . done ( ) ;
203
+ } ,
204
+ 'without group set' : function ( test ) {
205
+ plugins = proj . pbxGroupByName ( 'Plugins' ) ;
206
+ delete plugins . path ;
207
+
208
+ var newFile = proj . addStaticLibrary ( 'Plugins/libGoogleAnalytics.a' ,
209
+ { plugin : true } ) ,
210
+ libraryPaths = librarySearchPaths ( proj ) ,
211
+ expectedPath = '"\\"$(SRCROOT)/KitchenSinktablet/Plugins\\""' ,
212
+ i , current ;
213
+
214
+ for ( i = 0 ; i < libraryPaths . length ; i ++ ) {
215
+ current = libraryPaths [ i ] ;
216
+ test . ok ( current . indexOf ( expectedPath ) >= 0 ,
217
+ expectedPath + ' not found in ' + current ) ;
218
+ }
194
219
195
- for ( i = 0 ; i < libraryPaths . length ; i ++ ) {
196
- current = libraryPaths [ i ] ;
197
- test . ok ( current . indexOf ( expectedPath ) >= 0 ,
198
- expectedPath + ' not found in ' + current ) ;
220
+ test . done ( ) ;
199
221
}
200
-
201
- test . done ( ) ;
202
222
}
203
223
}
0 commit comments