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.

Run the folder case test on a disk of its own

Țugui Dragoș0679a773119b
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/DuplicateFinderTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/DuplicateFinderTests.swift
index ded512c4..41e0f727 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/DuplicateFinderTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/DuplicateFinderTests.swift
@@ -660,9 +660,14 @@ struct DuplicateFinderTests {
@Test func aFolderSpelledInAnotherCaseIsJudgedAsTheDiskSpellsIt() throws {
let directory = try TemporaryDirectory()
- let home = try directory.directory("home")
- try directory.directory("home/Library/Application Support")
- try directory.directory("home/Music/Music")
+ let volume = try ScratchVolume(
+ fileSystem: "APFS", mountedAt: directory.url.appending(path: "Disk", directoryHint: .isDirectory)
+ )
+ let home = volume.url.appending(path: "home", directoryHint: .isDirectory)
+ try FileManager.default.createDirectory(
+ at: home.appending(path: "Library/Application Support"), withIntermediateDirectories: true
+ )
+ try FileManager.default.createDirectory(at: home.appending(path: "Music/Music"), withIntermediateDirectories: true)
let finder = DuplicateFinder(homeDirectory: home)
for path in ["library", "LIBRARY/application support", "music/MUSIC"] {