diff --git a/Tests/SwiftDriverTests/CachingBuildTests.swift b/Tests/SwiftDriverTests/CachingBuildTests.swift index 494c2cda0..e55f9c457 100644 --- a/Tests/SwiftDriverTests/CachingBuildTests.swift +++ b/Tests/SwiftDriverTests/CachingBuildTests.swift @@ -148,9 +148,7 @@ final class CachingBuildTests: XCTestCase { try withTemporaryDirectory { path in let main = path.appending(component: "testCachingBuildJobs.swift") try localFileSystem.writeFileContents(main) { - $0 <<< "import C;" - $0 <<< "import E;" - $0 <<< "import G;" + $0.send("import C;import E;import G;") } let casPath = path.appending(component: "cas") let swiftModuleInterfacesPath: AbsolutePath = @@ -278,9 +276,7 @@ final class CachingBuildTests: XCTestCase { try withTemporaryDirectory { path in let main = path.appending(component: "testExplicitModuleVerifyInterfaceJobs.swift") try localFileSystem.writeFileContents(main) { - $0 <<< "import C;" - $0 <<< "import E;" - $0 <<< "import G;" + $0.send("import C;import E;import G;") } let swiftModuleInterfacesPath: AbsolutePath = @@ -427,9 +423,7 @@ final class CachingBuildTests: XCTestCase { try localFileSystem.createDirectory(moduleCachePath) let main = path.appending(component: "testCachingBuild.swift") try localFileSystem.writeFileContents(main) { - $0 <<< "import C;" - $0 <<< "import E;" - $0 <<< "import G;" + $0.send("import C;import E;import G;") } let cHeadersPath: AbsolutePath = @@ -477,17 +471,17 @@ final class CachingBuildTests: XCTestCase { let foo = path.appending(component: "foo.swift") let casPath = path.appending(component: "cas") try localFileSystem.writeFileContents(foo) { - $0 <<< "extension Profiler {" - $0 <<< " public static let count: Int = 42" - $0 <<< "}" + $0.send("extension Profiler {") + $0.send(" public static let count: Int = 42") + $0.send("}") } let fooHeader = path.appending(component: "foo.h") try localFileSystem.writeFileContents(fooHeader) { - $0 <<< "struct Profiler { void* ptr; };" + $0.send("struct Profiler { void* ptr; };") } let main = path.appending(component: "main.swift") try localFileSystem.writeFileContents(main) { - $0 <<< "import Foo" + $0.send("import Foo") } let sdkArgumentsForTesting = (try? Driver.sdkArgumentsForTesting()) ?? [] @@ -546,9 +540,7 @@ final class CachingBuildTests: XCTestCase { try withTemporaryDirectory { path in let main = path.appending(component: "testDependencyScanning.swift") try localFileSystem.writeFileContents(main) { - $0 <<< "import C;" - $0 <<< "import E;" - $0 <<< "import G;" + $0.send("import C;import E;import G;") } let cHeadersPath: AbsolutePath = diff --git a/Tests/SwiftDriverTests/ExplicitModuleBuildTests.swift b/Tests/SwiftDriverTests/ExplicitModuleBuildTests.swift index 8a116c11e..36ac32717 100644 --- a/Tests/SwiftDriverTests/ExplicitModuleBuildTests.swift +++ b/Tests/SwiftDriverTests/ExplicitModuleBuildTests.swift @@ -362,9 +362,7 @@ final class ExplicitModuleBuildTests: XCTestCase { try withTemporaryDirectory { path in let main = path.appending(component: "testExplicitModuleVerifyInterfaceJobs.swift") try localFileSystem.writeFileContents(main) { - $0 <<< "import C;" - $0 <<< "import E;" - $0 <<< "import G;" + $0.send("import C;import E;import G;") } let swiftModuleInterfacesPath: AbsolutePath = @@ -1029,17 +1027,17 @@ final class ExplicitModuleBuildTests: XCTestCase { try localFileSystem.createDirectory(FooInstallPath) let foo = path.appending(component: "foo.swift") try localFileSystem.writeFileContents(foo) { - $0 <<< "extension Profiler {" - $0 <<< " public static let count: Int = 42" - $0 <<< "}" + $0.send("extension Profiler {") + $0.send(" public static let count: Int = 42") + $0.send("}") } let fooHeader = path.appending(component: "foo.h") try localFileSystem.writeFileContents(fooHeader) { - $0 <<< "struct Profiler { void* ptr; };" + $0.send("struct Profiler { void* ptr; };") } let main = path.appending(component: "main.swift") try localFileSystem.writeFileContents(main) { - $0 <<< "import Foo" + $0.send("import Foo") } let sdkArgumentsForTesting = (try? Driver.sdkArgumentsForTesting()) ?? [] diff --git a/Tests/SwiftDriverTests/SwiftDriverTests.swift b/Tests/SwiftDriverTests/SwiftDriverTests.swift index 665157fbd..d5d413922 100644 --- a/Tests/SwiftDriverTests/SwiftDriverTests.swift +++ b/Tests/SwiftDriverTests/SwiftDriverTests.swift @@ -2200,8 +2200,9 @@ final class SwiftDriverTests: XCTestCase { do { try withTemporaryDirectory { path in - try localFileSystem.writeFileContents( - path.appending(components: "wasi", "static-executable-args.lnk")) { $0 <<< "garbage" } + try localFileSystem.writeFileContents(path.appending(components: "wasi", "static-executable-args.lnk")) { + $0.send("garbage") + } // Wasm executable linking var driver = try Driver(args: commonArgs + ["-emit-executable", "-Ounchecked", "-target", "wasm32-unknown-wasi",