Skip to content

Commit b1aa741

Browse files
committed
FoundationEssentialTests: elide some tests on Windows
Windows does not have the concept of a "root" user, instead all users have rights assigned to them with a capabilities system. As there is no equivalent for `euid`, simply elide this suite on Windows for now.
1 parent e07817c commit b1aa741

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Tests/FoundationEssentialsTests/FileManager/FileManagerTests.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,8 @@ final class FileManagerTests : XCTestCase {
523523
XCTAssertFalse($0.fileExists(atPath: "does_not_exist"))
524524
}
525525
}
526-
526+
527+
#if !os(Windows)
527528
func testFileAccessAtPath() throws {
528529
guard getuid() != 0 else {
529530
// Root users can always access anything, so this test will not function when run as root
@@ -552,7 +553,8 @@ final class FileManagerTests : XCTestCase {
552553
}
553554
}
554555
}
555-
556+
#endif
557+
556558
func testFileSystemAttributesAtPath() throws {
557559
try FileManagerPlayground {
558560
"Foo"

0 commit comments

Comments
 (0)