authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-01-11 02:43:35 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-01-11 02:43:35 -08:00
log49120131201e6aeaa62720a8b06bd5357ff7d82f
tree6042505023526cb3309f940eb6d146f5d9fd4ffb
parent3c8d7f0f22d2cc214849c1d2b4dd7d6a6e1b1bbd

add test


3 files changed, 26 insertions(+), 2 deletions(-)

build.zig+13
......@@ -42,4 +42,17 @@ pub fn build(b: *std.Build) void {
4242
4343 const run_step2 = b.step("gen", "generate the list");
4444 run_step2.dependOn(&run_cmd2.step);
45
46 const tests = b.addTest(.{
47 .root_source_file = b.path("test.zig"),
48 .target = target,
49 .optimize = mode,
50 });
51 deps.addAllTo(tests);
52
53 const test_step = b.step("test", "Run all library tests");
54 const tests_run = b.addRunArtifact(tests);
55 tests_run.has_side_effects = true;
56 test_step.dependOn(&tests_run.step);
57 test_step.dependOn(&exe2.step);
4558}
test.zig created+12
......@@ -0,0 +1,12 @@
1const std = @import("std");
2const licenses = @import("licenses");
3
4test {
5 _ = &licenses.spdx;
6 _ = &licenses.osi;
7 _ = &licenses.blueoak.model;
8 _ = &licenses.blueoak.gold;
9 _ = &licenses.blueoak.silver;
10 _ = &licenses.blueoak.bronze;
11 _ = &licenses.blueoak.lead;
12}
zig.mod+1-2
......@@ -2,6 +2,5 @@ id: 0npcrzfdlrvkf44mzjo8bduj9gmqyefo0j3rstt6b0pm2r6r
22name: licenses
33main: src/lib.zig
44license: MIT
5
6dev_dependencies:
5root_dependencies:
76 - src: git https://github.com/nektro/zig-json