forked from fealebenpae/node-xcode
-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsection-entries.js
More file actions
25 lines (21 loc) · 931 Bytes
/
section-entries.js
File metadata and controls
25 lines (21 loc) · 931 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
var PEG = require('pegjs'),
fs = require('fs'),
pbx = fs.readFileSync('test/parser/projects/section-entries.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 have a PBXVariantGroup section'] = function (test) {
test.ok(project.objects['PBXVariantGroup']);
test.done();
}
exports['should have two children for PBXVariantGroup'] = function (test) {
test.ok(project.objects['PBXVariantGroup']['1F766FDF13BBADB100FB74C0']);
test.ok(project.objects['PBXVariantGroup']['1F766FDC13BBADB100FB74C0']);
test.done();
}
exports['should store quote-surround values correctly'] = function (test) {
var localizable = project.objects['PBXVariantGroup']['1F766FDF13BBADB100FB74C0'];
test.equal(localizable.sourceTree, '"<group>"');
test.done();
}