Add regression coverage for app lookup open targets
This commit is contained in:
parent
93d2245a97
commit
bb6dacf20d
2 changed files with 39 additions and 5 deletions
|
|
@ -417,11 +417,13 @@ enum TerminalDirectoryOpenTarget: String, CaseIterable {
|
|||
let homeDirectoryPath: String
|
||||
let fileExistsAtPath: (String) -> Bool
|
||||
let isExecutableFileAtPath: (String) -> Bool
|
||||
let applicationPathForName: (String) -> String?
|
||||
|
||||
static let live = DetectionEnvironment(
|
||||
homeDirectoryPath: FileManager.default.homeDirectoryForCurrentUser.path,
|
||||
fileExistsAtPath: { FileManager.default.fileExists(atPath: $0) },
|
||||
isExecutableFileAtPath: { FileManager.default.isExecutableFile(atPath: $0) }
|
||||
isExecutableFileAtPath: { FileManager.default.isExecutableFile(atPath: $0) },
|
||||
applicationPathForName: { NSWorkspace.shared.fullPath(forApplication: $0) }
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue