Skip to content

Commit cab8043

Browse files
debug windows mix path
1 parent bfcec90 commit cab8043

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Tests/SwiftDriverTests/SwiftDriverTests.swift

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7107,6 +7107,22 @@ final class SwiftDriverTests: XCTestCase {
71077107
XCTAssert(plannedJobs[0].commandLine.contains(.flag(importHeaderFlag)))
71087108
XCTAssert(plannedJobs[0].commandLine.contains(try toPathOption("TestInputHeader.h")))
71097109
}
7110+
7111+
// Mixed path on Windows.
7112+
#if os(windows)
7113+
do {
7114+
try withTemporaryDirectory { path in
7115+
let headerPath = path.appending("TestInputHeader.h")
7116+
try localFileSystem.writeFileContents(headerPath, bytes: "void test(void);")
7117+
let swiftPath = path.appending("foo.swift")
7118+
try localFileSystem.writeFileContents(swiftPath, bytes: "func foo() { test() }")
7119+
let pathStr = path.nativePathString(escaped: true)
7120+
var driver = try Driver(args: ["swift", "-import-objc-header", pathStr + "/TestInputHeader.h", pathStr + "/foo.swift", "-v", "-I", pathStr + "/include", "-sdk", pathStr + "/sdk"])
7121+
let plannedJobs = try driver.planBuild()
7122+
try driver.run(jobs: plannedJobs)
7123+
}
7124+
}
7125+
#endif
71107126
}
71117127

71127128
func testPCMGeneration() throws {

0 commit comments

Comments
 (0)