forked from fealebenpae/node-xcode
-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtwo-sections.js
More file actions
18 lines (16 loc) · 641 Bytes
/
two-sections.js
File metadata and controls
18 lines (16 loc) · 641 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
var PEG = require('pegjs'),
fs = require('fs'),
pbx = fs.readFileSync('test/parser/projects/two-sections.pbxproj', 'utf-8'),
grammar = fs.readFileSync('lib/parser/pbxproj.pegjs', 'utf-8'),
parser = PEG.buildParser(grammar),
rawProj = parser.parse(pbx),
project = rawProj.project;
exports['should parse a project with two sections'] = function (test) {
// if it gets this far it's worked
test.done();
}
exports['should have both sections on the project object'] = function (test) {
test.ok(project.objects['PBXTargetDependency']);
test.ok(project.objects['PBXSourcesBuildPhase']);
test.done();
}