import Foundation import Testing struct AppleHealthDisclosureTests { @Test func `Apple Health disclosure is visible before privacy access expands`() throws { let settings = try Self.source("Design/SettingsProTabSections.swift") let permissionsStart = try #require(settings.range(of: "var permissionsDestination: some View")) let permissionsEnd = try #require( settings.range( of: "var voiceDestination: some View", range: permissionsStart.upperBound.. String { let url = URL(fileURLWithPath: #filePath) .deletingLastPathComponent() .deletingLastPathComponent() .appendingPathComponent("Sources") .appendingPathComponent(relativePath) return try String(contentsOf: url, encoding: .utf8) } }