@@ -35,8 +35,8 @@ private let destinationV1 = (
35
35
json: #"""
36
36
{
37
37
"version": 1,
38
- "sdk": " \#( bundleRootPath. appending ( sdkRootDir) ) ",
39
- "toolchain-bin-dir": " \#( bundleRootPath. appending ( toolchainBinDir) ) ",
38
+ "sdk": " \#( bundleRootPath. appending ( sdkRootDir) . _nativePathString ( escaped : true ) ) ",
39
+ "toolchain-bin-dir": " \#( bundleRootPath. appending ( toolchainBinDir) . _nativePathString ( escaped : true ) ) ",
40
40
"target": " \#( linuxGNUTargetTriple. tripleString) ",
41
41
"extra-cc-flags": \#( extraFlags. cCompilerFlags) ,
42
42
"extra-swiftc-flags": \#( extraFlags. swiftCompilerFlags) ,
@@ -51,7 +51,7 @@ private let destinationV2 = (
51
51
{
52
52
"version": 2,
53
53
"sdkRootDir": " \#( sdkRootDir) ",
54
- "toolchainBinDir": " \#( toolchainBinDir) ",
54
+ "toolchainBinDir": " \#( toolchainBinDir. pathString . replacingOccurrences ( of : " \\ " , with : " \\ \\ " ) ) ",
55
55
"hostTriples": [" \#( hostTriple. tripleString) "],
56
56
"targetTriples": [" \#( linuxGNUTargetTriple. tripleString) "],
57
57
"extraCCFlags": \#( extraFlags. cCompilerFlags) ,
@@ -330,7 +330,7 @@ final class DestinationTests: XCTestCase {
330
330
$0 as? StringError ,
331
331
StringError (
332
332
"""
333
- Couldn't parse toolset configuration at `/tools/asdf.json`: /tools/asdf.json doesn't exist in file \
333
+ Couldn't parse toolset configuration at ` \( AbsolutePath ( " /tools/asdf.json " ) . _nativePathString ( escaped : false ) ) `: \( AbsolutePath ( " /tools/asdf.json " ) . _nativePathString ( escaped : false ) ) doesn't exist in file \
334
334
system
335
335
"""
336
336
)
@@ -349,7 +349,7 @@ final class DestinationTests: XCTestCase {
349
349
) ) {
350
350
XCTAssertTrue (
351
351
( $0 as? StringError ) ? . description
352
- . hasPrefix ( " Couldn't parse toolset configuration at `/tools/invalidToolset.json`: " ) ?? false
352
+ . hasPrefix ( " Couldn't parse toolset configuration at ` \( AbsolutePath ( " /tools/invalidToolset.json " ) . _nativePathString ( escaped : false ) ) `: " ) ?? false
353
353
)
354
354
}
355
355
}
0 commit comments