Skip to content

Commit 2d86693

Browse files
committed
tests: repair the test suite on Windows
Recent changes seem to have regressed the test suite on Windows due to the construction of the `ByteString` from the `String`. Repair this to allow us to test on Windows again.
1 parent 603c5c6 commit 2d86693

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Tests/SwiftDriverTests/SwiftDriverTests.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1539,17 +1539,17 @@ final class SwiftDriverTests: XCTestCase {
15391539

15401540
#if os(Windows)
15411541
try localFileSystem.writeFileContents(fooPath, bytes:
1542-
"""
1542+
.init(("""
15431543
a\\b c\\\\d e\\\\\"f g\" h\\\"i j\\\\\\\"k \"lmn\" o pqr \"st \\\"u\" \\v"
15441544
@\(barPath.nativePathString(escaped: true))
1545-
"""
1545+
""").utf8)
15461546
)
15471547
try localFileSystem.writeFileContents(barPath, bytes:
1548-
#"""
1548+
.init((#"""
15491549
-Xswiftc -use-ld=lld
15501550
-Xcc -IS:\Library\sqlite-3.36.0\usr\include
15511551
-Xlinker -LS:\Library\sqlite-3.36.0\usr\lib
1552-
"""#
1552+
"""#).utf8)
15531553
)
15541554
let args = try Driver.expandResponseFiles(["@\(fooPath.pathString)"], fileSystem: localFileSystem, diagnosticsEngine: diags)
15551555
XCTAssertEqual(args, ["a\\b", "c\\\\d", "e\\f g", "h\"i", "j\\\"k", "lmn", "o", "pqr", "st \"u", "\\v", "-Xswiftc", "-use-ld=lld", "-Xcc", "-IS:\\Library\\sqlite-3.36.0\\usr\\include", "-Xlinker", "-LS:\\Library\\sqlite-3.36.0\\usr\\lib"])

0 commit comments

Comments
 (0)