@@ -1456,6 +1456,57 @@ class PIFBuilderTests: XCTestCase {
1456
1456
}
1457
1457
}
1458
1458
}
1459
+
1460
+ func testLibraryTargetWithModuleMap( ) throws {
1461
+ let fs = InMemoryFileSystem ( emptyFiles:
1462
+ " /Bar/Sources/BarLib/lib.c " ,
1463
+ " /Bar/Sources/BarLib/module.modulemap "
1464
+ )
1465
+
1466
+ let diagnostics = DiagnosticsEngine ( )
1467
+ let graph = try loadPackageGraph (
1468
+ fs: fs,
1469
+ diagnostics: diagnostics,
1470
+ manifests: [
1471
+ Manifest . createManifest (
1472
+ name: " Bar " ,
1473
+ path: " /Bar " ,
1474
+ url: " /Bar " ,
1475
+ v: . v4_2,
1476
+ packageKind: . root,
1477
+ cLanguageStandard: " c11 " ,
1478
+ swiftLanguageVersions: [ . v4_2] ,
1479
+ products: [
1480
+ . init( name: " BarLib " , type: . library( . dynamic) , targets: [ " BarLib " ] ) ,
1481
+ ] ,
1482
+ targets: [
1483
+ . init( name: " BarLib " ) ,
1484
+ ] ) ,
1485
+ ]
1486
+ )
1487
+
1488
+ var pif : PIF . TopLevelObject !
1489
+ try ! withCustomEnv ( [ " PKG_CONFIG_PATH " : inputsDir. pathString] ) {
1490
+ let builder = PIFBuilder ( graph: graph, parameters: . mock( shouldCreateDylibForDynamicProducts: true ) , diagnostics: diagnostics)
1491
+ pif = try builder. construct ( )
1492
+ }
1493
+
1494
+ XCTAssertNoDiagnostics ( diagnostics)
1495
+
1496
+ PIFTester ( pif) { workspace in
1497
+ workspace. checkProject ( " PACKAGE:/Bar " ) { project in
1498
+ project. checkTarget ( " PACKAGE-PRODUCT:BarLib " ) { target in
1499
+ XCTAssertEqual ( target. name, " BarLib " )
1500
+
1501
+ target. checkBuildConfiguration ( " Debug " ) { configuration in
1502
+ configuration. checkBuildSettings { settings in
1503
+ XCTAssertNil ( settings [ . MODULEMAP_FILE_CONTENTS] )
1504
+ }
1505
+ }
1506
+ }
1507
+ }
1508
+ }
1509
+ }
1459
1510
1460
1511
func testSystemLibraryTargets( ) throws {
1461
1512
let fs = InMemoryFileSystem ( emptyFiles:
0 commit comments