// SPDX-FileCopyrightText: © 2026 Jeffrey C. Ollie // SPDX-License-Identifier: MIT //! The zone files the tests read. //! //! They are a module of their own because three things want the same bytes: //! the tests that read them and write them back, the fuzzer that mutates them, //! and the differential check that hands them to BIND as well. A second copy //! of a zone file is a second thing to keep right. //! //! Each one is a real zone file rather than a fragment, and each is one BIND //! also accepts -- which is what makes comparing the two meaningful. /// One zone file, and what it has to be read with. pub const Zone = struct { /// The file name, which is also what the differential check looks for in /// `tests/zones`. name: []const u8, /// The apex. origin: []const u8, text: []const u8, /// How many records reading it should produce. A number in a test is a /// poor check on its own; this one is here so that a change which quietly /// drops a record cannot pass. records: usize, }; pub const zones = [_]Zone{ .{ .name = "example.com.zone", .origin = "example.com.", .text = @embedFile("zones/example.com.zone"), .records = 37, }, .{ .name = "2.0.192.in-addr.arpa.zone", .origin = "2.0.192.in-addr.arpa.", .text = @embedFile("zones/2.0.192.in-addr.arpa.zone"), .records = 216, }, .{ .name = "oddities.test.zone", .origin = "oddities.test.", .text = @embedFile("zones/oddities.test.zone"), .records = 24, }, .{ .name = "everything.test.zone", .origin = "everything.test.", .text = @embedFile("zones/everything.test.zone"), .records = 60, }, .{ .name = "legacy.test.zone", .origin = "legacy.test.", .text = @embedFile("zones/legacy.test.zone"), .records = 20, }, };