zig/test/link/bss/build.zig
Andrew Kelley e122cd6312 new linker test harness
It's simpler and it takes advantage of
`std.Build.addAnonymousDependency`, which has a number of benefits,
including concurrenc and preventing extra zig-cache and zig-out
directories being created.

4 tests are ported over as an example.
2023-03-15 10:48:14 -07:00

18 lines
396 B
Zig

const std = @import("std");
pub fn build(b: *std.Build) void {
const test_step = b.step("test", "Test");
b.default_step = test_step;
const exe = b.addExecutable(.{
.name = "bss",
.root_source_file = .{ .path = "main.zig" },
.optimize = .Debug,
});
const run = exe.run();
run.expectStdOutEqual("0, 1, 0\n");
test_step.dependOn(&run.step);
}