File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ var PEG = require ( 'pegjs' ) ,
2+ fs = require ( 'fs' ) ,
3+ pbx = fs . readFileSync ( 'test/projects/section.pbxproj' , 'utf-8' ) ,
4+ grammar = fs . readFileSync ( 'pbxproj.pegjs' , 'utf-8' ) ,
5+ parser = PEG . buildParser ( grammar ) ,
6+ rawProj = parser . parse ( pbx ) ,
7+ project = rawProj . project ;
8+
9+ exports [ 'should have a PBXTargetDependency section' ] = function ( test ) {
10+ test . ok ( project . objects [ 'PBXTargetDependency' ] ) ;
11+ test . done ( ) ;
12+ }
13+
14+ exports [ 'should have the right child of PBXTargetDependency section' ] = function ( test ) {
15+ test . ok ( project . objects [ 'PBXTargetDependency' ] [ '301BF551109A68C00062928A' ] ) ;
16+ test . done ( ) ;
17+ }
18+
19+ exports [ 'should have the right properties on the dependency' ] = function ( test ) {
20+ var dependency = project . objects [ 'PBXTargetDependency' ] [ '301BF551109A68C00062928A' ] ;
21+
22+ test . equal ( dependency . isa , 'PBXTargetDependency' )
23+ test . equal ( dependency . name , 'PhoneGapLib' )
24+ test . equal ( dependency . targetProxy , '301BF550109A68C00062928A' )
25+ test . equal ( dependency [ 'targetProxy_comment' ] , 'PBXContainerItemProxy' )
26+
27+ test . done ( ) ;
28+ }
You can’t perform that action at this time.
0 commit comments