@@ -42,15 +42,16 @@ class ShellOutTests: XCTestCase {
42
42
}
43
43
44
44
func testSingleCommandAtPath( ) throws {
45
+ let tempDir = NSTemporaryDirectory ( )
45
46
try shellOut (
46
47
to: " echo " . checked,
47
- arguments: [ # "Hello" > \#( NSTemporaryDirectory ( ) ) ShellOutTests-SingleCommand.txt"# . quoted]
48
+ arguments: [ " Hello " , " > " . verbatim , " \( tempDir ) ShellOutTests-SingleCommand.txt " . quoted]
48
49
)
49
50
50
51
let textFileContent = try shellOut (
51
52
to: " cat " . checked,
52
53
arguments: [ " ShellOutTests-SingleCommand.txt " . quoted] ,
53
- at: NSTemporaryDirectory ( )
54
+ at: tempDir
54
55
)
55
56
56
57
XCTAssertEqual ( textFileContent, " Hello " )
@@ -180,33 +181,6 @@ class ShellOutTests: XCTestCase {
180
181
XCTAssertEqual ( try shellOut ( to: . readFile( at: filePath) ) , " Hello again " )
181
182
}
182
183
183
- func testSwiftPackageManagerCommands( ) throws {
184
- // Setup & clear state
185
- let tempFolderPath = NSTemporaryDirectory ( )
186
- try shellOut ( to: " rm " . checked,
187
- arguments: [ " -rf " , " SwiftPackageManagerTest " ] . verbatim,
188
- at: tempFolderPath)
189
- try shellOut ( to: . createFolder( named: " SwiftPackageManagerTest " ) , at: tempFolderPath)
190
-
191
- // Create a Swift package and verify that it has a Package.swift file
192
- let packagePath = tempFolderPath + " /SwiftPackageManagerTest "
193
- try shellOut ( to: . createSwiftPackage( ) , at: packagePath)
194
- XCTAssertFalse ( try shellOut ( to: . readFile( at: packagePath + " /Package.swift " ) ) . isEmpty)
195
-
196
- // Build the package and verify that there's a .build folder
197
- try shellOut ( to: . buildSwiftPackage( ) , at: packagePath)
198
- XCTAssertTrue (
199
- try shellOut ( to: " ls " . checked, arguments: [ " -a " . verbatim] , at: packagePath) . contains ( " .build " )
200
- )
201
-
202
- // Generate an Xcode project
203
- try shellOut ( to: . generateSwiftPackageXcodeProject( ) , at: packagePath)
204
- XCTAssertTrue (
205
- try shellOut ( to: " ls " . checked, arguments: [ " -a " . verbatim] , at: packagePath)
206
- . contains ( " SwiftPackageManagerTest.xcodeproj " )
207
- )
208
- }
209
-
210
184
func testArgumentQuoting( ) throws {
211
185
XCTAssertEqual ( try shellOut ( to: " echo " . checked,
212
186
arguments: [ " foo ; echo bar " . quoted] ) ,
0 commit comments