Skip to content

Commit 74223ef

Browse files
committed
Add test case
rdar://109060298 (cherry picked from commit c75cfd4)
1 parent a7d8c68 commit 74223ef

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

Tests/SwiftDriverTests/SwiftDriverTests.swift

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6734,6 +6734,7 @@ final class SwiftDriverTests: XCTestCase {
67346734

67356735
try withTemporaryDirectory { tmpDir in
67366736
var driver = try Driver(args: ["swiftc", "-typecheck", "foo.swift"],
6737+
integratedDriver: false,
67376738
compilerExecutableDir: tmpDir)
67386739
guard driver.isFrontendArgSupported(.externalPluginPath) else {
67396740
return
@@ -6776,6 +6777,27 @@ final class SwiftDriverTests: XCTestCase {
67766777
}
67776778
}
67786779

6780+
func testExternalPluginPathsDisabled() throws {
6781+
#if !os(macOS)
6782+
throw XCTSkip("Supported only in macOS")
6783+
#endif
6784+
6785+
try withTemporaryDirectory { tmpDir in
6786+
var driver = try Driver(args: ["swiftc", "-typecheck", "foo.swift"],
6787+
integratedDriver: true,
6788+
compilerExecutableDir: tmpDir)
6789+
guard driver.isFrontendArgSupported(.externalPluginPath) else {
6790+
return
6791+
}
6792+
6793+
let jobs = try driver.planBuild().removingAutolinkExtractJobs()
6794+
XCTAssertEqual(jobs.count, 1)
6795+
let job = jobs.first!
6796+
6797+
XCTAssertFalse(job.commandLine.contains(.flag("-external-plugin-path")))
6798+
}
6799+
}
6800+
67796801
func testClangModuleValidateOnce() throws {
67806802
let flagTest = try Driver(args: ["swiftc", "-typecheck", "foo.swift"])
67816803
guard flagTest.isFrontendArgSupported(.clangBuildSessionFile),

0 commit comments

Comments
 (0)