@@ -41,4 +41,34 @@ final class ModuleAliasingFixtureTests: XCTestCase {
41
41
_ = try await SwiftPM . Build. execute ( packagePath: pkgPath)
42
42
}
43
43
}
44
+
45
+ func testModuleNestedDeps1( ) async throws {
46
+ try await fixture ( name: " ModuleAliasing/NestedDeps1 " ) { fixturePath in
47
+ let pkgPath = fixturePath. appending ( components: " AppPkg " )
48
+ let buildPath = pkgPath. appending ( components: " .build " , try UserToolchain . default. targetTriple. platformBuildPathComponent, " debug " )
49
+ await XCTAssertBuilds ( pkgPath, extraArgs: [ " --vv " ] )
50
+ XCTAssertFileExists ( buildPath. appending ( components: " App " ) )
51
+ XCTAssertFileExists ( buildPath. appending ( components: " Modules " , " A.swiftmodule " ) )
52
+ XCTAssertFileExists ( buildPath. appending ( components: " Modules " , " AFooUtils.swiftmodule " ) )
53
+ XCTAssertFileExists ( buildPath. appending ( components: " Modules " , " CarUtils.swiftmodule " ) )
54
+ XCTAssertFileExists ( buildPath. appending ( components: " Modules " , " X.swiftmodule " ) )
55
+ XCTAssertFileExists ( buildPath. appending ( components: " Modules " , " XFooUtils.swiftmodule " ) )
56
+ XCTAssertFileExists ( buildPath. appending ( components: " Modules " , " XUtils.swiftmodule " ) )
57
+ _ = try await SwiftPM . Build. execute ( packagePath: pkgPath)
58
+ }
59
+ }
60
+
61
+ func testModuleNestedDeps2( ) async throws {
62
+ try await fixture ( name: " ModuleAliasing/NestedDeps2 " ) { fixturePath in
63
+ let pkgPath = fixturePath. appending ( components: " AppPkg " )
64
+ let buildPath = pkgPath. appending ( components: " .build " , try UserToolchain . default. targetTriple. platformBuildPathComponent, " debug " )
65
+ await XCTAssertBuilds ( pkgPath, extraArgs: [ " --vv " ] )
66
+ XCTAssertFileExists ( buildPath. appending ( components: " App " ) )
67
+ XCTAssertFileExists ( buildPath. appending ( components: " Modules " , " A.swiftmodule " ) )
68
+ XCTAssertFileExists ( buildPath. appending ( components: " Modules " , " BUtils.swiftmodule " ) )
69
+ XCTAssertFileExists ( buildPath. appending ( components: " Modules " , " CUtils.swiftmodule " ) )
70
+ XCTAssertFileExists ( buildPath. appending ( components: " Modules " , " XUtils.swiftmodule " ) )
71
+ _ = try await SwiftPM . Build. execute ( packagePath: pkgPath)
72
+ }
73
+ }
44
74
}
0 commit comments