@@ -1298,22 +1298,22 @@ class TestFileManager : XCTestCase {
1298
1298
XCTAssertEqual ( code, emptyFileNameError ?? . fileNoSuchFile)
1299
1299
}
1300
1300
1301
- XCTAssertThrowsError ( try fm. copyItem ( atPath: " " , toPath: " /tmp/t " ) ) {
1301
+ XCTAssertThrowsError ( try fm. copyItem ( atPath: " " , toPath: " /test_emptyFilename_nonExistent " ) ) {
1302
1302
let code = ( $0 as? CocoaError ) ? . code
1303
1303
XCTAssertEqual ( code, emptyFileNameError ?? . fileReadNoSuchFile)
1304
1304
}
1305
1305
XCTAssertThrowsError ( try fm. copyItem ( atPath: " " , toPath: " " ) ) {
1306
1306
let code = ( $0 as? CocoaError ) ? . code
1307
1307
XCTAssertEqual ( code, emptyFileNameError ?? . fileReadNoSuchFile)
1308
1308
}
1309
- XCTAssertThrowsError ( try fm. copyItem ( atPath: " /tmp/t " , toPath: " " ) ) {
1309
+ XCTAssertThrowsError ( try fm. copyItem ( atPath: " /test_emptyFilename_nonExistent " , toPath: " " ) ) {
1310
1310
let code = ( $0 as? CocoaError ) ? . code
1311
1311
XCTAssertEqual ( code, . fileReadNoSuchFile)
1312
1312
}
1313
1313
1314
1314
#if false
1315
1315
// TODO: re-enable when URLResourceValues are supported in swift-foundation
1316
- XCTAssertThrowsError ( try fm. moveItem ( atPath: " " , toPath: " /tmp/t " ) ) {
1316
+ XCTAssertThrowsError ( try fm. moveItem ( atPath: " " , toPath: " /test_emptyFilename_nonExistent " ) ) {
1317
1317
let code = ( $0 as? CocoaError ) ? . code
1318
1318
XCTAssertEqual ( code, emptyFileNameError ?? . fileReadInvalidFileName)
1319
1319
}
@@ -1326,7 +1326,7 @@ class TestFileManager : XCTestCase {
1326
1326
XCTAssertEqual ( code, . fileWriteFileExists)
1327
1327
#endif
1328
1328
}
1329
- XCTAssertThrowsError ( try fm. moveItem ( atPath: " /tmp/t " , toPath: " " ) ) {
1329
+ XCTAssertThrowsError ( try fm. moveItem ( atPath: " /test_emptyFilename_nonExistent " , toPath: " " ) ) {
1330
1330
let code = ( $0 as? CocoaError ) ? . code
1331
1331
#if os(Windows)
1332
1332
XCTAssertEqual ( code, . fileNoSuchFile)
@@ -1335,15 +1335,15 @@ class TestFileManager : XCTestCase {
1335
1335
#endif
1336
1336
}
1337
1337
1338
- XCTAssertThrowsError ( try fm. linkItem ( atPath: " " , toPath: " /tmp/t " ) ) {
1338
+ XCTAssertThrowsError ( try fm. linkItem ( atPath: " " , toPath: " /test_emptyFilename_nonExistent " ) ) {
1339
1339
let code = ( $0 as? CocoaError ) ? . code
1340
1340
XCTAssertEqual ( code, emptyFileNameError ?? . fileReadNoSuchFile)
1341
1341
}
1342
1342
XCTAssertThrowsError ( try fm. linkItem ( atPath: " " , toPath: " " ) ) {
1343
1343
let code = ( $0 as? CocoaError ) ? . code
1344
1344
XCTAssertEqual ( code, emptyFileNameError ?? . fileReadNoSuchFile)
1345
1345
}
1346
- XCTAssertThrowsError ( try fm. linkItem ( atPath: " /tmp/t " , toPath: " " ) ) {
1346
+ XCTAssertThrowsError ( try fm. linkItem ( atPath: " /test_emptyFilename_nonExistent " , toPath: " " ) ) {
1347
1347
let code = ( $0 as? CocoaError ) ? . code
1348
1348
XCTAssertEqual ( code, . fileReadNoSuchFile)
1349
1349
}
@@ -1352,11 +1352,11 @@ class TestFileManager : XCTestCase {
1352
1352
let code = ( $0 as? CocoaError ) ? . code
1353
1353
XCTAssertEqual ( code, emptyFileNameError ?? . fileNoSuchFile)
1354
1354
}
1355
- XCTAssertThrowsError ( try fm. createSymbolicLink ( atPath: " " , withDestinationPath: " /tmp/t " ) ) {
1355
+ XCTAssertThrowsError ( try fm. createSymbolicLink ( atPath: " " , withDestinationPath: " /test_emptyFilename_nonExistent " ) ) {
1356
1356
let code = ( $0 as? CocoaError ) ? . code
1357
1357
XCTAssertEqual ( code, emptyFileNameError ?? . fileNoSuchFile)
1358
1358
}
1359
- XCTAssertThrowsError ( try fm. createSymbolicLink ( atPath: " /tmp/t " , withDestinationPath: " " ) ) {
1359
+ XCTAssertThrowsError ( try fm. createSymbolicLink ( atPath: " /test_emptyFilename_nonExistent " , withDestinationPath: " " ) ) {
1360
1360
let code = ( $0 as? CocoaError ) ? . code
1361
1361
XCTAssertEqual ( code, . fileNoSuchFile)
1362
1362
}
@@ -1387,8 +1387,8 @@ class TestFileManager : XCTestCase {
1387
1387
1388
1388
XCTAssertNil ( fm. contents ( atPath: " " ) )
1389
1389
XCTAssertFalse ( fm. contentsEqual ( atPath: " " , andPath: " " ) )
1390
- XCTAssertFalse ( fm. contentsEqual ( atPath: " /tmp/t " , andPath: " " ) )
1391
- XCTAssertFalse ( fm. contentsEqual ( atPath: " " , andPath: " /tmp/t " ) )
1390
+ XCTAssertFalse ( fm. contentsEqual ( atPath: " /test_emptyFilename_nonExistent " , andPath: " " ) )
1391
+ XCTAssertFalse ( fm. contentsEqual ( atPath: " " , andPath: " /test_emptyFilename_nonExistent " ) )
1392
1392
1393
1393
//_ = fm.fileSystemRepresentation(withPath: "") // NSException
1394
1394
XCTAssertEqual ( fm. string ( withFileSystemRepresentation: UnsafePointer ( bitPattern: 1 ) !, length: 0 ) , " " )
0 commit comments