Skip to content

Commit 96e1f48

Browse files
committed
Test for "Include out-of-target sources"
1 parent 6bb1ca4 commit 96e1f48

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

Tests/PackageLoadingTests/PackageBuilderTests.swift

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3477,6 +3477,31 @@ final class PackageBuilderTests: XCTestCase {
34773477
}
34783478
}
34793479
}
3480+
3481+
func testOutOfTargetSource() throws {
3482+
let fs = InMemoryFileSystem(
3483+
emptyFiles:
3484+
"/Sources/foo/foo.swift",
3485+
"/Sources/bar/bar.swift"
3486+
)
3487+
3488+
let manifest = try Manifest.createRootManifest(
3489+
displayName: "pkg",
3490+
toolsVersion: .vNext,
3491+
targets: [
3492+
TargetDescription(
3493+
name: "foo",
3494+
sources: ["../bar/bar.swift"]
3495+
),
3496+
]
3497+
)
3498+
3499+
PackageBuilderTester(manifest, in: fs) { package, _ in
3500+
package.checkModule("foo") { module in
3501+
module.checkSources(sources: ["../bar/bar.swift"])
3502+
}
3503+
}
3504+
}
34803505
}
34813506

34823507
final class PackageBuilderTester {

0 commit comments

Comments
 (0)