Something went wrong. Try again.
An auto tiler for macOS
Something went wrong. Try again.
12345678910111213141516171819202122232425262728import Foundationimport Testing
@testable import ParcelTestSupport
@Suite struct FixtureBundleTests { @Test func createsAnInspectableBundleWithoutLaunchingAnApp() throws { let directory = FileManager.default.temporaryDirectory.appendingPathComponent( "parcel-fixture-\(UUID().uuidString)") try FileManager.default.createDirectory(at: directory, withIntermediateDirectories: false) defer { do { try FileManager.default.removeItem(at: directory) } catch { Issue.record(error) } } let executable = try createFixtureBundle(directory: directory, bundleID: "org.example.fixture") let bundle = executable.deletingLastPathComponent().deletingLastPathComponent().deletingLastPathComponent() #expect(Bundle(url: bundle)?.bundleIdentifier == "org.example.fixture") #expect(Bundle(url: bundle)?.executableURL?.resolvingSymlinksInPath() == executable.resolvingSymlinksInPath()) #expect(FileManager.default.isExecutableFile(atPath: executable.path)) }
@Test(arguments: ["", "app name", "org.example\n"]) func rejectsInvalidBundleIdentifiers(bundleID: String) { #expect(throws: E2EError.self) { try createFixtureBundle(directory: FileManager.default.temporaryDirectory, bundleID: bundleID) } }}