We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 09d6466 commit e4d45d7Copy full SHA for e4d45d7
1 file changed
test/removeSourceFile.js
@@ -126,6 +126,21 @@ exports.removeSourceFile = {
126
127
test.ok(!sourceObj);
128
test.done();
129
+ },
130
+ 'should remove file from PBXFileReference after modified by Xcode': function(test) {
131
+ var fileRef = proj.addSourceFile('Plugins/file.m').fileRef;
132
+
133
+ // Simulate Xcode's behaviour of stripping quotes around path and name
134
+ // properties.
135
+ var entry = proj.pbxFileReferenceSection()[fileRef];
136
+ entry.name = entry.name.replace(/^"(.*)"$/, "$1");
137
+ entry.path = entry.path.replace(/^"(.*)"$/, "$1");
138
139
+ var newFile = proj.removeSourceFile('Plugins/file.m');
140
141
+ test.ok(newFile.uuid);
142
+ test.ok(!proj.pbxFileReferenceSection()[fileRef]);
143
+ test.done();
144
}
145
146
0 commit comments