Merged via squash. Prepared head SHA: c702d98bd63f4de4059df54f8aaea1ff56c01a34 Co-authored-by: stablegenius49 <259448942+stablegenius49@users.noreply.github.com> Co-authored-by: ImLukeF <92253590+ImLukeF@users.noreply.github.com> Reviewed-by: @ImLukeF
20 lines
738 B
Swift
20 lines
738 B
Swift
import Foundation
|
|
import Testing
|
|
@testable import OpenClaw
|
|
|
|
struct LaunchAgentManagerTests {
|
|
@Test func `launch at login plist does not keep app alive after manual quit`() throws {
|
|
let plist = LaunchAgentManager.plistContents(bundlePath: "/Applications/OpenClaw.app")
|
|
let data = try #require(plist.data(using: .utf8))
|
|
let object = try #require(
|
|
PropertyListSerialization.propertyList(from: data, format: nil) as? [String: Any]
|
|
)
|
|
|
|
#expect(object["RunAtLoad"] as? Bool == true)
|
|
#expect(object["KeepAlive"] == nil)
|
|
|
|
let args = try #require(object["ProgramArguments"] as? [String])
|
|
#expect(args == ["/Applications/OpenClaw.app/Contents/MacOS/OpenClaw"])
|
|
}
|
|
}
|