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.

Hold the Calculator test to the name Peel gives apps

Țugui Dragoș6e341c4b86cf
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/AppInspectorTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/AppInspectorTests.swift
index ce4011ab..274345c1 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/AppInspectorTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/AppInspectorTests.swift
@@ -198,7 +198,9 @@ struct AppInspectorTests {
@Test func anAppMacOSKnowsIsNamedAsFinderNamesIt() {
let calculator = URL(filePath: "/System/Applications/Calculator.app", directoryHint: .isDirectory)
- let finder = FileManager.default.displayName(atPath: calculator.path(percentEncoded: false))
+ let shown = FileManager.default.displayName(atPath: calculator.path(percentEncoded: false))
+ // Finder shows the extension when Show all filename extensions is on, and an app's name never carries it.
+ let finder = shown.hasSuffix(".app") ? String(shown.dropLast(4)) : shown
#expect(AppInspector.displayName(of: calculator) == finder)
}