Skip to content

armgit / peel

Public Imported from GitHub
0

Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.

Test that this Mac's Trash answers the Full Disk Access probe

Țugui Dragoș6f1726dd31f0
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/HomeTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/HomeTests.swift
index 7022dc5d..7531231e 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/HomeTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/HomeTests.swift
@@ -128,6 +128,12 @@ struct AccessTests {
#expect(await FullDiskAccess.state(home: home) == .granted)
}
+ @Test(.enabled(if: ProcessInfo.processInfo.environment["PEEL_TEST_THIS_MAC"] != nil))
+ func thisMacsTrashAnswersTheProbeClearly() async {
+ #expect(FullDiskAccess.canList(URL.homeDirectory.appending(path: ".Trash")) != .unknown)
+ #expect(await FullDiskAccess.state() != .unknown)
+ }
+
/// Uses a folder of its own rather than `/Applications`, where write access depends on the account.
@Test func readsAppManagementFromARemoval() throws {
let directory = try TemporaryDirectory()