The Core-level regression tests added for the launch-paths BLOCKER (ReturnWatcherTests.swift) hand-replicate what AppDelegate.makeLaunchModel() and AppModel.bootstrap() do, rather than calling them — a future revert of either would not fail `swift test`. Neither lives in ShotdeckCore, so ShotdeckCoreTests cannot reach them; this new test target depends on the Shotdeck executable target itself and uses @testable import (confirmed this works cleanly with SwiftPM despite Shotdeck's main.swift top-level-code entry point — no separate main-symbol conflict). realLaunchModelAndBootstrapDetectAMarkedOneDriveReturn persists transport=.oneDrive (UserDefaults.standard, snapshot-and-restore — the same established pattern PickerSelfTest's ONEDRIVE-SELFTEST phase already uses, since neither of these real call sites has any defaults-threading to plug an isolated suite into), calls AppDelegate.makeLaunchModel(appSupportRoot: <temp>) and awaits model.bootstrap() UNMODIFIED, then drops a marked-up Redline PDF into the temp OneDrive folder and asserts the watcher reports it. Verified this test actually catches the original blocker: temporarily reverted makeLaunchModel() to the AirDrop-only resolver, and separately reverted bootstrap()'s updateWatchFolder reconcile — both reproduce the failure (the discarded revert is not part of this commit). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ZiTXPbPCSjzPVsfoweAbp
41 lines
1.3 KiB
Swift
41 lines
1.3 KiB
Swift
// swift-tools-version: 6.0
|
|
|
|
import PackageDescription
|
|
|
|
let package = Package(
|
|
name: "Shotdeck",
|
|
platforms: [
|
|
.macOS(.v14),
|
|
],
|
|
products: [
|
|
.library(name: "ShotdeckCore", targets: ["ShotdeckCore"]),
|
|
.executable(name: "Shotdeck", targets: ["Shotdeck"]),
|
|
],
|
|
dependencies: [],
|
|
targets: [
|
|
.target(
|
|
name: "ShotdeckCore",
|
|
swiftSettings: [.swiftLanguageMode(.v6)]
|
|
),
|
|
.executableTarget(
|
|
name: "Shotdeck",
|
|
dependencies: ["ShotdeckCore"],
|
|
swiftSettings: [.swiftLanguageMode(.v6)]
|
|
),
|
|
.testTarget(
|
|
name: "ShotdeckCoreTests",
|
|
dependencies: ["ShotdeckCore"],
|
|
swiftSettings: [.swiftLanguageMode(.v6)]
|
|
),
|
|
// Exercises the real Shotdeck-app-target wiring (AppDelegate.makeLaunchModel(),
|
|
// AppModel.bootstrap()) via @testable import — logic ShotdeckCoreTests cannot
|
|
// reach because it only depends on ShotdeckCore, not the Shotdeck executable
|
|
// target itself. See ReturnWatcherLaunchWiringTests.swift.
|
|
.testTarget(
|
|
name: "ShotdeckTests",
|
|
dependencies: ["Shotdeck", "ShotdeckCore"],
|
|
swiftSettings: [.swiftLanguageMode(.v6)]
|
|
),
|
|
]
|
|
)
|