           """
             "pid" : -1000,
           """))
+#if os(Windows)
+          let mainPath: String = workdir.appending(component: "main.swift").pathString.nativePathString().escaped()
+#else
+          let mainPath: String = workdir.appending(component: "main.swift").pathString.replacingOccurrences(of: "/", with: "\\/")
+#endif
           XCTAssertTrue(errorOutput.contains(
           """
             \"inputs\" : [
-              \"\\/WorkDir\\/main.swift\"
+              \"\(mainPath)\"
             ],
           """))
           XCTAssertTrue(errorOutput.contains(
           """
             "pid" : -1001,
           """))
+#if os(Windows)
+          let test1Path: String = workdir.appending(component: "test1.swift").pathString.nativePathString().escaped()
+#else
+          let test1Path: String = workdir.appending(component: "test1.swift").pathString.replacingOccurrences(of: "/", with: "\\/")
+#endif
           XCTAssertTrue(errorOutput.contains(
           """
             \"inputs\" : [
-              \"\\/WorkDir\\/test1.swift\"
+              \"\(test1Path)\"
             ],
           """))
           XCTAssertTrue(errorOutput.contains(
           """
             "pid" : -1002,
           """))
+#if os(Windows)
+          let test2Path: String = workdir.appending(component: "test2.swift").pathString.nativePathString().escaped()
+#else
+          let test2Path: String = workdir.appending(component: "test2.swift").pathString.replacingOccurrences(of: "/", with: "\\/")
+#endif
           XCTAssertTrue(errorOutput.contains(
           """
             \"inputs\" : [
-              \"\\/WorkDir\\/test2.swift\"
+              \"\(test2Path)\"
             ],
           """))
 

      try withTemporaryDirectory { path in
        try withHijackedBufferedErrorStream(in: path) { errorBuffer in
          let resolver = try ArgsResolver(fileSystem: localFileSystem)
          var driver = try Driver(args: ["swiftc", "-o", "test.o",
                                         "main.swift", "test1.swift", "test2.swift",
                                         "-enable-batch-mode", "-driver-batch-count", "1",
                                         "-working-directory", "/WorkDir"])
          let jobs = try driver.planBuild()
          let compileJob = jobs[0]
          let args : [String] = try resolver.resolveArgumentList(for: compileJob, forceResponseFiles: false)

import XCTest
import TSCBasic
import TSCUtility
import Foundation

@_spi(Testing) import SwiftDriver

