Skip to content

Commit a6fd23c

Browse files
committed
Add a unit test for tests that can link against executables.
1 parent 9d2cf77 commit a6fd23c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Tests/FunctionalTests/MiscellaneousTests.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,20 @@ class MiscellaneousTestCase: XCTestCase {
537537
}
538538
}
539539

540+
func testTestsCanLinkAgainstExecutable() {
541+
fixture(name: "Miscellaneous/ExeTest") { prefix in
542+
do {
543+
let (stdout, _) = try executeSwiftTest(prefix)
544+
XCTAssertMatch(stdout, .contains("Compiling Exe main.swift"))
545+
XCTAssertMatch(stdout, .contains("Compiling ExeTests ExeTests.swift"))
546+
XCTAssertMatch(stdout, .contains("Eliding symbols from Exe_main.swift.o"))
547+
XCTAssertMatch(stdout, .contains("Linking ExeTestPackageTests"))
548+
} catch {
549+
XCTFail()
550+
}
551+
}
552+
}
553+
540554
func testExecutableTargetMismatch() {
541555
fixture(name: "Miscellaneous/TargetMismatch") { path in
542556
do {

0 commit comments

Comments
 (0)