zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit a608ecd335df46b7d13dfaef3372b1120b774921 (tree)
parent 5434f85c47f6412a8d5faf681419c15533bb388c
Author: fardragon <michaldrozd@protonmail.ch>
Date:   Sun, 31 May 2026 10:01:33 +0000

Fix config_header build.zig

Diffstat:
Mtest/standalone/config_header/build.zig | 23++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/test/standalone/config_header/build.zig b/test/standalone/config_header/build.zig @@ -1,6 +1,9 @@ const std = @import("std"); pub fn build(b: *std.Build) void { + const test_step = b.step("test", "Test it"); + b.default_step = test_step; + const config_header = b.addConfigHeader( .{ .style = .{ .autoconf_undef = b.path("config.h.in") } }, .{ @@ -23,6 +26,24 @@ pub fn build(b: *std.Build) void { const check_config_header = b.addCheckFile(config_header.getOutputFile(), .{ .expected_exact = @embedFile("config.h") }); - const test_step = b.step("test", "Test it"); + const config_header_autoconf_at = b.addConfigHeader( + .{ .style = .{ + .autoconf_at = b.path("autoconf_at/autoconf_at.txt.in"), + } }, + .{ + .undefined = null, + .defined = {}, + .boolean_true = true, + .boolean_false = false, + .integer = 42, + .string = "text", + .string_at = "@string@", + }, + ); + const check_config_header_autoconf_at = b.addCheckFile(config_header_autoconf_at.getOutputFile(), .{ + .expected_exact = @embedFile("autoconf_at/autoconf_at.txt"), + }); + test_step.dependOn(&check_config_header.step); + test_step.dependOn(&check_config_header_autoconf_at.step); }