@@ -24,14 +24,20 @@ final class FileIteratorTests: XCTestCase {
24
24
try FileManager . default. removeItem ( at: tmpdir)
25
25
}
26
26
27
- func testNoFollowSymlinks( ) {
27
+ func testNoFollowSymlinks( ) throws {
28
+ #if os(Windows) && compiler(<5.10)
29
+ try XCTSkipIf ( true , " Foundation does not follow symlinks on Windows " )
30
+ #endif
28
31
let seen = allFilesSeen ( iteratingOver: [ tmpdir] , followSymlinks: false )
29
32
XCTAssertEqual ( seen. count, 2 )
30
33
XCTAssertTrue ( seen. contains { $0. hasSuffix ( " project/real1.swift " ) } )
31
34
XCTAssertTrue ( seen. contains { $0. hasSuffix ( " project/real2.swift " ) } )
32
35
}
33
36
34
- func testFollowSymlinks( ) {
37
+ func testFollowSymlinks( ) throws {
38
+ #if os(Windows) && compiler(<5.10)
39
+ try XCTSkipIf ( true , " Foundation does not follow symlinks on Windows " )
40
+ #endif
35
41
let seen = allFilesSeen ( iteratingOver: [ tmpdir] , followSymlinks: true )
36
42
XCTAssertEqual ( seen. count, 3 )
37
43
XCTAssertTrue ( seen. contains { $0. hasSuffix ( " project/real1.swift " ) } )
@@ -40,7 +46,10 @@ final class FileIteratorTests: XCTestCase {
40
46
XCTAssertTrue ( seen. contains { $0. hasSuffix ( " project/.hidden.swift " ) } )
41
47
}
42
48
43
- func testTraversesHiddenFilesIfExplicitlySpecified( ) {
49
+ func testTraversesHiddenFilesIfExplicitlySpecified( ) throws {
50
+ #if os(Windows) && compiler(<5.10)
51
+ try XCTSkipIf ( true , " Foundation does not follow symlinks on Windows " )
52
+ #endif
44
53
let seen = allFilesSeen (
45
54
iteratingOver: [ tmpURL ( " project/.build " ) , tmpURL ( " project/.hidden.swift " ) ] ,
46
55
followSymlinks: false
0 commit comments