authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-02-06 04:36:04 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-02-06 04:36:04 -08:00
log18fee8113d3f3a195a95e11f507290b3a9203b1a
treeca1d4c5784c978ca4bd274bbfd8515567359d829
parent55b4dbd8cc788e08aafcf365ad64a16508aa7f3d

add tests


2 files changed, 19 insertions(+), 0 deletions(-)

build.zig+12
...@@ -19,4 +19,16 @@ pub fn build(b: *std.Build) void {...@@ -19,4 +19,16 @@ pub fn build(b: *std.Build) void {
19 .install_dir = .header,19 .install_dir = .header,
20 .install_subdir = "unicode",20 .install_subdir = "unicode",
21 });21 });
22
23 const tests = b.addTest(.{
24 .root_source_file = b.path("test.zig"),
25 .target = target,
26 .optimize = mode,
27 });
28 deps.addAllTo(tests);
29
30 const test_step = b.step("test", "Run all library tests");
31 const tests_run = b.addRunArtifact(tests);
32 tests_run.has_side_effects = true;
33 test_step.dependOn(&tests_run.step);
22}34}
test.zig created+7
...@@ -0,0 +1,7 @@
1const std = @import("std");
2const icu = @import("icu");
3
4// TODO: run the official test suite from unicode
5test {
6 std.testing.refAllDeclsRecursive(icu);
7}