import Contacts import EventKit import Foundation import Photos import Testing @testable import OpenClaw struct PrivacyAccessRegistrationTests { @Test func `refresh all reconnects once for advertised permission changes`() throws { let source = try String(contentsOf: Self.sourceURL(), encoding: .utf8) let start = try #require(source.range(of: "private func refreshAll()")) let end = try #require( source.range(of: "private func updatePhotosStatus(", range: start.upperBound.. URL { URL(fileURLWithPath: #filePath) .deletingLastPathComponent() .deletingLastPathComponent() .appendingPathComponent("Sources/Settings/PrivacyAccessSectionView.swift") } }