Comparing version 0.3.5 to 0.4.0
@@ -41,8 +41,2 @@ var pbxProj = require('./pbxProject'), | ||
function escapeInternals(str) { | ||
return str.replace(QUOTED, function (orig, middle) { | ||
return f('"%s"', middle.replace(/"/g, '\\"')); | ||
}); | ||
} | ||
util.inherits(pbxWriter, EventEmitter); | ||
@@ -149,5 +143,2 @@ | ||
} else { | ||
if (QUOTED.test(obj)) | ||
obj = escapeInternals(obj); | ||
if (cmt) { | ||
@@ -154,0 +145,0 @@ this.write("%s = %s /* %s */;\n", key, obj, cmt) |
@@ -5,3 +5,3 @@ { | ||
"description": "parser for xcodeproj/project.pbxproj files", | ||
"version": "0.3.5", | ||
"version": "0.4.0", | ||
"main":"index.js", | ||
@@ -8,0 +8,0 @@ "repository": { |
@@ -7,2 +7,3 @@ var PEG = require('pegjs'), | ||
rawProj = parser.parse(pbx), | ||
util = require('util'), | ||
project = rawProj.project; | ||
@@ -22,1 +23,10 @@ | ||
} | ||
exports['should read an escaped value correctly'] = function (test) { | ||
var xcbConfig = project.objects['XCBuildConfiguration'], | ||
debugSettings = xcbConfig['C01FCF4F08A954540054247B'].buildSettings, | ||
expt = '"\\"$(PHONEGAPLIB)/Classes/JSON\\" \\"$(PHONEGAPLIB)/Classes\\""'; | ||
test.strictEqual(debugSettings['USER_HEADER_SEARCH_PATHS'], expt); | ||
test.done(); | ||
} |
@@ -36,3 +36,4 @@ var pbx = require('../lib/pbxProject'), | ||
for (var i=0; i<writtenLines.length; i++) { | ||
test.equal(writtenLines[i], contentLines[i]) | ||
test.equal(writtenLines[i], contentLines[i], | ||
'match failed on line ' + (i+1)) | ||
} | ||
@@ -63,2 +64,5 @@ | ||
}, | ||
'should write out the "header-search" test': function (test) { | ||
testProjectContents('test/parser/projects/header-search.pbxproj', test); | ||
}, | ||
'should write out the "nested-object" test': function (test) { | ||
@@ -65,0 +69,0 @@ testProjectContents('test/parser/projects/nested-object.pbxproj', test); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
213148
42
3817
1
11