Files
2026-07-13 12:22:33 +08:00

18 lines
610 B
Swift

import Foundation
import Testing
@testable import CodexBar
struct InstallOriginTests {
@Test
func `detects homebrew caskroom`() {
#expect(
InstallOrigin
.isHomebrewCask(
appBundleURL: URL(fileURLWithPath: "/opt/homebrew/Caskroom/codexbar/1.0.0/CodexBar.app")))
#expect(
InstallOrigin
.isHomebrewCask(appBundleURL: URL(fileURLWithPath: "/usr/local/Caskroom/codexbar/1.0.0/CodexBar.app")))
#expect(!InstallOrigin.isHomebrewCask(appBundleURL: URL(fileURLWithPath: "/Applications/CodexBar.app")))
}
}