Files
gronod 5389e4c2bd
macOS CI / build-and-test (push) Skipped
feat(print): AirPrint queue detection + Stage 2 warning badge (#202 Phase 5)
- CupsParsers: lpstatDeviceURIs / lpoptionsMakeAndModel /
  detectAirPrint — the six docs/14 §10.2 rules (apple-airprint:// URI,
  *APAirPrint: True, Apple+AirPrint make-and-model, ipps://+PPD
  mention, ipp:// + _universal mDNS subtype, cupsFilter2→image/urf).
- CupsService.listPrinters: one tolerated lpstat -v spawn feeds
  detection; lpoptions -p yields displayName + makeAndModel in a
  single spawn; Printer.isAirPrint populated per queue.
- Printer.isAirPrint defaults false with a tolerant decoder.
- Stage2View: live airPrintWarningBadge — "AirPrint queue —
  unmanaged colour cannot be guaranteed."
- Fixtures: lpstat -v marks Mock_Canon_Pro via _universal subtype;
  lpoptions emits printer-make-and-model.
- Tests: six rule fixtures + USB negative + a no-fallback-respawn
  listPrinters case; Milestone12AirPrintUITests tracks the badge
  across queue selection.

Gate: full xcodebuild test green (515 unit + 70 UI).
2026-09-17 17:20:25 +01:00

26 lines
848 B
Bash
Executable File

#!/bin/sh
# Mock lpstat for Milestone3UITests. Emits two canned queues so the UI
# can exercise select/refresh/status-badge without real CUPS.
case "$1" in
-e)
printf 'Mock_Epson_7450\nMock_Canon_Pro\n'
;;
-p)
printf 'printer Mock_Epson_7450 is idle. enabled since Mon Sep 7 21:50:25 2026\n'
printf 'printer Mock_Canon_Pro disabled since Tue Sep 8 09:00:00 2026 -\n\tPaused\n'
;;
-d)
printf 'system default destination: Mock_Epson_7450\n'
;;
-v)
# Mock_Canon_Pro is the AirPrint fixture queue (#202): local
# unencrypted ipp:// resolved via the _universal mDNS subtype.
printf 'device for Mock_Epson_7450: usb://EPSON/XP-55%%20Series?serial=MOCK123\n'
printf 'device for Mock_Canon_Pro: ipp://Mock%%20Canon%%20Pro._universal._sub._ipp._tcp.local./\n'
;;
*)
exit 1
;;
esac
exit 0