Skip to content

Commit bcd2f0d

Browse files
debug windows mix path
1 parent bfcec90 commit bcd2f0d

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Tests/SwiftDriverTests/SwiftDriverTests.swift

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7109,6 +7109,24 @@ final class SwiftDriverTests: XCTestCase {
71097109
}
71107110
}
71117111

7112+
func testMixedWindowsPath() throws {
7113+
// Mixed path on Windows.
7114+
#if os(windows)
7115+
do {
7116+
try withTemporaryDirectory { path in
7117+
let headerPath = path.appending("TestInputHeader.h")
7118+
try localFileSystem.writeFileContents(headerPath, bytes: "void test(void);")
7119+
let swiftPath = path.appending("foo.swift")
7120+
try localFileSystem.writeFileContents(swiftPath, bytes: "func foo() { test() }")
7121+
let pathStr = path.nativePathString(escaped: true)
7122+
var driver = try Driver(args: ["swift", "-c", "-import-objc-header", pathStr + "/TestInputHeader.h", pathStr + "/foo.swift", "-v", "-I", pathStr + "/include", "-sdk", pathStr + "/sdk"])
7123+
let plannedJobs = try driver.planBuild()
7124+
try driver.run(jobs: plannedJobs)
7125+
}
7126+
}
7127+
#endif
7128+
}
7129+
71127130
func testPCMGeneration() throws {
71137131
do {
71147132
var driver = try Driver(args: ["swiftc", "-emit-pcm", "module.modulemap", "-module-name", "Test"])

0 commit comments

Comments
 (0)