@@ -143,7 +143,7 @@ class TargetSourcesBuilderTests: XCTestCase {
143
143
toolsVersion: . minimumRequired,
144
144
fileTypes: [ " something " ] )
145
145
146
- build ( target: target, additionalFileRules: [ somethingRule] , toolsVersion: . v5, fs: fs) { _, _, _, _ in
146
+ build ( target: target, additionalFileRules: [ somethingRule] , toolsVersion: . v5, fs: fs) { _, _, _, _, _ in
147
147
// No diagnostics
148
148
}
149
149
}
@@ -161,7 +161,7 @@ class TargetSourcesBuilderTests: XCTestCase {
161
161
" /Resources/Sub/foo.txt "
162
162
)
163
163
164
- build ( target: target, toolsVersion: . v5_3, fs: fs) { _, _, _, diagnostics in
164
+ build ( target: target, toolsVersion: . v5_3, fs: fs) { _, _, _, _ , diagnostics in
165
165
diagnostics. check ( diagnostic: " multiple resources named 'foo.txt' in target 'Foo' " , behavior: . error)
166
166
diagnostics. checkUnordered ( diagnostic: " found 'Resources/foo.txt' " , behavior: . note)
167
167
diagnostics. checkUnordered ( diagnostic: " found 'Resources/Sub/foo.txt' " , behavior: . note)
@@ -181,7 +181,7 @@ class TargetSourcesBuilderTests: XCTestCase {
181
181
" /Copied/foo.txt "
182
182
)
183
183
184
- build ( target: target, toolsVersion: . v5_3, fs: fs) { _, _, _, diagnostics in
184
+ build ( target: target, toolsVersion: . v5_3, fs: fs) { _, _, _, _ , diagnostics in
185
185
diagnostics. check ( diagnostic: " multiple resources named 'foo.txt' in target 'Foo' " , behavior: . error)
186
186
diagnostics. checkUnordered ( diagnostic: " found 'Processed/foo.txt' " , behavior: . note)
187
187
diagnostics. checkUnordered ( diagnostic: " found 'Copied/foo.txt' " , behavior: . note)
@@ -201,7 +201,7 @@ class TargetSourcesBuilderTests: XCTestCase {
201
201
" /Copied/foo.txt "
202
202
)
203
203
204
- build ( target: target, toolsVersion: . v5_3, fs: fs) { _, _, _, diagnostics in
204
+ build ( target: target, toolsVersion: . v5_3, fs: fs) { _, _, _, _ , diagnostics in
205
205
// No diagnostics
206
206
}
207
207
}
@@ -219,7 +219,7 @@ class TargetSourcesBuilderTests: XCTestCase {
219
219
" /B/Copy/foo.txt "
220
220
)
221
221
222
- build ( target: target, toolsVersion: . v5_3, fs: fs) { _, _, _, diagnostics in
222
+ build ( target: target, toolsVersion: . v5_3, fs: fs) { _, _, _, _ , diagnostics in
223
223
diagnostics. check ( diagnostic: " multiple resources named 'Copy' in target 'Foo' " , behavior: . error)
224
224
diagnostics. checkUnordered ( diagnostic: " found 'A/Copy' " , behavior: . note)
225
225
diagnostics. checkUnordered ( diagnostic: " found 'B/Copy' " , behavior: . note)
@@ -239,7 +239,7 @@ class TargetSourcesBuilderTests: XCTestCase {
239
239
" /B/EN.lproj/foo.txt "
240
240
)
241
241
242
- build ( target: target, toolsVersion: . v5_3, fs: fs) { _, _, _, diagnostics in
242
+ build ( target: target, toolsVersion: . v5_3, fs: fs) { _, _, _, _ , diagnostics in
243
243
diagnostics. check ( diagnostic: " multiple resources named 'en.lproj/foo.txt' in target 'Foo' " , behavior: . error)
244
244
diagnostics. checkUnordered ( diagnostic: " found 'A/en.lproj/foo.txt' " , behavior: . note)
245
245
diagnostics. checkUnordered ( diagnostic: " found 'B/EN.lproj/foo.txt' " , behavior: . note)
@@ -259,7 +259,7 @@ class TargetSourcesBuilderTests: XCTestCase {
259
259
" /B/en.lproj/foo.txt "
260
260
)
261
261
262
- build ( target: target, toolsVersion: . v5_3, fs: fs) { _, _, _, diagnostics in
262
+ build ( target: target, toolsVersion: . v5_3, fs: fs) { _, _, _, _ , diagnostics in
263
263
diagnostics. check ( diagnostic: " resource 'B/en.lproj' in target 'Foo' conflicts with other localization directories " , behavior: . error)
264
264
}
265
265
}
@@ -272,7 +272,7 @@ class TargetSourcesBuilderTests: XCTestCase {
272
272
" /en.lproj/Localizable.strings "
273
273
)
274
274
275
- build ( target: target, toolsVersion: . v5_2, fs: fs) { _, resources, _, _ in
275
+ build ( target: target, toolsVersion: . v5_2, fs: fs) { _, resources, _, _, _ in
276
276
XCTAssert ( resources. isEmpty)
277
277
// No diagnostics
278
278
}
@@ -289,7 +289,7 @@ class TargetSourcesBuilderTests: XCTestCase {
289
289
" /Copied/en.lproj/sub/Localizable.strings "
290
290
)
291
291
292
- build ( target: target, toolsVersion: . v5_3, fs: fs) { _, _, _, diagnostics in
292
+ build ( target: target, toolsVersion: . v5_3, fs: fs) { _, _, _, _ , diagnostics in
293
293
diagnostics. check ( diagnostic: " localization directory 'Processed/en.lproj' in target 'Foo' contains sub-directories, which is forbidden " , behavior: . error)
294
294
}
295
295
}
@@ -303,7 +303,7 @@ class TargetSourcesBuilderTests: XCTestCase {
303
303
" /Resources/en.lproj/Localizable.strings "
304
304
)
305
305
306
- build ( target: target, toolsVersion: . v5_3, fs: fs) { _, _, _, diagnostics in
306
+ build ( target: target, toolsVersion: . v5_3, fs: fs) { _, _, _, _ , diagnostics in
307
307
diagnostics. check (
308
308
diagnostic: . contains( """
309
309
resource 'Resources/en.lproj/Localizable.strings' in target 'Foo' is in a localization directory \
@@ -330,7 +330,7 @@ class TargetSourcesBuilderTests: XCTestCase {
330
330
" /Icon.png "
331
331
)
332
332
333
- build ( target: target, defaultLocalization: " fr " , toolsVersion: . v5_3, fs: fs) { _, _, _, diagnostics in
333
+ build ( target: target, defaultLocalization: " fr " , toolsVersion: . v5_3, fs: fs) { _, _, _, _ , diagnostics in
334
334
diagnostics. check (
335
335
diagnostic: . contains( " resource 'Icon.png' in target 'Foo' is missing the default localization 'fr' " ) ,
336
336
behavior: . warning)
@@ -355,7 +355,7 @@ class TargetSourcesBuilderTests: XCTestCase {
355
355
" /Icon.png "
356
356
)
357
357
358
- build ( target: target, toolsVersion: . v5_3, fs: fs) { _, _, _, diagnostics in
358
+ build ( target: target, toolsVersion: . v5_3, fs: fs) { _, _, _, _ , diagnostics in
359
359
diagnostics. checkUnordered (
360
360
diagnostic: . contains( " resource 'Localizable.strings' in target 'Foo' has both localized and un-localized variants " ) ,
361
361
behavior: . warning)
@@ -391,7 +391,7 @@ class TargetSourcesBuilderTests: XCTestCase {
391
391
" /Other/Image.png "
392
392
)
393
393
394
- build ( target: target, defaultLocalization: " fr " , toolsVersion: . v5_3, fs: fs) { _, resources, _, diagnostics in
394
+ build ( target: target, defaultLocalization: " fr " , toolsVersion: . v5_3, fs: fs) { _, resources, _ , _, diagnostics in
395
395
XCTAssertEqual ( Set ( resources) , [
396
396
Resource ( rule: . process, path: AbsolutePath ( " /Processed/foo.txt " ) , localization: nil ) ,
397
397
Resource ( rule: . process, path: AbsolutePath ( " /Processed/En-uS.lproj/Localizable.stringsdict " ) , localization: " en-us " ) ,
@@ -412,7 +412,7 @@ class TargetSourcesBuilderTests: XCTestCase {
412
412
" /Foo/es.lproj/Image.png "
413
413
)
414
414
415
- build ( target: try TargetDescription ( name: " Foo " ) , defaultLocalization: " fr " , toolsVersion: . v5_3, fs: fs) { _, resources, _, diagnostics in
415
+ build ( target: try TargetDescription ( name: " Foo " ) , defaultLocalization: " fr " , toolsVersion: . v5_3, fs: fs) { _, resources, _, _ , diagnostics in
416
416
XCTAssertEqual ( Set ( resources) , [
417
417
Resource ( rule: . process, path: AbsolutePath ( " /Foo/fr.lproj/Image.png " ) , localization: " fr " ) ,
418
418
Resource ( rule: . process, path: AbsolutePath ( " /Foo/es.lproj/Image.png " ) , localization: " es " ) ,
@@ -430,7 +430,7 @@ class TargetSourcesBuilderTests: XCTestCase {
430
430
" /Resources/Processed/Info.plist "
431
431
)
432
432
433
- build ( target: target, toolsVersion: . v5_3, fs: fs) { _, _, _, diagnostics in
433
+ build ( target: target, toolsVersion: . v5_3, fs: fs) { _, _, _, _ , diagnostics in
434
434
diagnostics. check (
435
435
diagnostic: . contains( " resource 'Resources/Processed/Info.plist' in target 'Foo' is forbidden " ) ,
436
436
behavior: . error)
@@ -446,7 +446,7 @@ class TargetSourcesBuilderTests: XCTestCase {
446
446
" /Resources/Copied/Info.plist "
447
447
)
448
448
449
- build ( target: target, toolsVersion: . v5_3, fs: fs) { _, _, _, diagnostics in
449
+ build ( target: target, toolsVersion: . v5_3, fs: fs) { _, _, _, _ , diagnostics in
450
450
diagnostics. check (
451
451
diagnostic: . contains( " resource 'Resources/Copied/Info.plist' in target 'Foo' is forbidden " ) ,
452
452
behavior: . error)
@@ -462,7 +462,7 @@ class TargetSourcesBuilderTests: XCTestCase {
462
462
fs: FileSystem ,
463
463
file: StaticString = #file,
464
464
line: UInt = #line,
465
- checker: ( Sources , [ Resource ] , [ AbsolutePath ] , DiagnosticsEngineResult ) -> ( )
465
+ checker: ( Sources , [ Resource ] , [ AbsolutePath ] , [ AbsolutePath ] , DiagnosticsEngineResult ) -> ( )
466
466
) {
467
467
let diagnostics = DiagnosticsEngine ( )
468
468
let builder = TargetSourcesBuilder (
@@ -478,10 +478,10 @@ class TargetSourcesBuilderTests: XCTestCase {
478
478
)
479
479
480
480
do {
481
- let ( sources, resources, headers) = try builder. run ( )
481
+ let ( sources, resources, headers, others ) = try builder. run ( )
482
482
483
483
DiagnosticsEngineTester ( diagnostics, file: file, line: line) { diagnostics in
484
- checker ( sources, resources, headers, diagnostics)
484
+ checker ( sources, resources, headers, others , diagnostics)
485
485
}
486
486
} catch {
487
487
XCTFail ( error. localizedDescription, file: file, line: line)
0 commit comments