| author | |
| committer | |
| log | 49120131201e6aeaa62720a8b06bd5357ff7d82f |
| tree | 6042505023526cb3309f940eb6d146f5d9fd4ffb |
| parent | 3c8d7f0f22d2cc214849c1d2b4dd7d6a6e1b1bbd |
3 files changed, 26 insertions(+), 2 deletions(-)
build.zig+13| ... | ... | @@ -42,4 +42,17 @@ pub fn build(b: *std.Build) void { |
| 42 | 42 | |
| 43 | 43 | const run_step2 = b.step("gen", "generate the list"); |
| 44 | 44 | 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); | |
| 45 | 58 | } |
test.zig created+12| ... | ... | @@ -0,0 +1,12 @@ |
| 1 | const std = @import("std"); | |
| 2 | const licenses = @import("licenses"); | |
| 3 | ||
| 4 | test { | |
| 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 |
| 2 | 2 | name: licenses |
| 3 | 3 | main: src/lib.zig |
| 4 | 4 | license: MIT |
| 5 | ||
| 6 | dev_dependencies: | |
| 5 | root_dependencies: | |
| 7 | 6 | - src: git https://github.com/nektro/zig-json |