Skip to content

Commit 2e8f76f

Browse files
committed
linux
1 parent 90b95c6 commit 2e8f76f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Tests/FunctionalTests/MiscellaneousTests.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,8 @@ class MiscellaneousTestCase: XCTestCase {
649649
XCTAssertDirectoryExists(customCachePath)
650650
}
651651

652+
// `FileSystem` does not support `chmod` on Linux
653+
#if os(macOS)
652654
fixture(name: "Miscellaneous/Simple") { path in
653655
try localFileSystem.chmod(.userUnWritable, path: path)
654656
let customCachePath = path.appending(components: "custom", "cache")
@@ -659,6 +661,7 @@ class MiscellaneousTestCase: XCTestCase {
659661
XCTAssert(output.contains("error: You don’t have permission"), "expected permissions error")
660662
XCTAssertNoSuchPath(customCachePath)
661663
}
664+
#endif
662665
}
663666

664667
func testCustomConfigPath() {
@@ -669,6 +672,8 @@ class MiscellaneousTestCase: XCTestCase {
669672
XCTAssertDirectoryExists(customConfigPath)
670673
}
671674

675+
// `FileSystem` does not support `chmod` on Linux
676+
#if os(macOS)
672677
fixture(name: "Miscellaneous/Simple") { path in
673678
try localFileSystem.chmod(.userUnWritable, path: path)
674679
let customConfigPath = path.appending(components: "custom", "config")
@@ -679,6 +684,7 @@ class MiscellaneousTestCase: XCTestCase {
679684
XCTAssert(output.contains("error: You don’t have permission"), "expected permissions error")
680685
XCTAssertNoSuchPath(customConfigPath)
681686
}
687+
#endif
682688
}
683689

684690
func testCustomSecurityPath() {
@@ -689,6 +695,8 @@ class MiscellaneousTestCase: XCTestCase {
689695
XCTAssertDirectoryExists(customSecurityPath)
690696
}
691697

698+
// `FileSystem` does not support `chmod` on Linux
699+
#if os(macOS)
692700
fixture(name: "Miscellaneous/Simple") { path in
693701
try localFileSystem.chmod(.userUnWritable, path: path)
694702
let customSecurityPath = path.appending(components: "custom", "security")
@@ -699,5 +707,6 @@ class MiscellaneousTestCase: XCTestCase {
699707
XCTAssert(output.contains("error: You don’t have permission"), "expected permissions error")
700708
XCTAssertNoSuchPath(customSecurityPath)
701709
}
710+
#endif
702711
}
703712
}

0 commit comments

Comments
 (0)