2023-01-31 15:19:51 +08:00
|
|
|
const std = @import("std");
|
2022-05-28 17:44:53 +08:00
|
|
|
|
2023-01-31 15:19:51 +08:00
|
|
|
pub fn build(b: *std.Build) void {
|
2022-05-28 17:44:53 +08:00
|
|
|
const test_step = b.step("test", "Test");
|
2023-03-07 15:40:55 +08:00
|
|
|
b.default_step = test_step;
|
2022-05-28 17:44:53 +08:00
|
|
|
|
2023-01-31 12:39:43 +08:00
|
|
|
const exe = b.addExecutable(.{
|
|
|
|
.name = "bss",
|
|
|
|
.root_source_file = .{ .path = "main.zig" },
|
2023-03-07 15:40:55 +08:00
|
|
|
.optimize = .Debug,
|
2023-01-31 12:39:43 +08:00
|
|
|
});
|
2022-05-28 17:44:53 +08:00
|
|
|
|
|
|
|
const run = exe.run();
|
|
|
|
run.expectStdOutEqual("0, 1, 0\n");
|
2023-03-07 15:40:55 +08:00
|
|
|
|
2022-05-28 17:44:53 +08:00
|
|
|
test_step.dependOn(&run.step);
|
|
|
|
}
|