Run tests defined in scanner.zig and common_core.zig

This commit is contained in:
Reiner Gerecke
2020-10-18 17:15:28 +02:00
committed by Isaac Freund
parent fbb211dff4
commit a9825f44ed
+11 -7
View File
@@ -22,15 +22,19 @@ pub fn build(b: *Builder) void {
}
{
const scanner_test = b.addTest("scanner.zig");
scanner_test.setTarget(target);
scanner_test.setBuildMode(mode);
scanner_test.linkLibC();
scanner_test.linkSystemLibrary("expat");
const test_files = [_][]const u8{ "scanner.zig", "src/common_core.zig" };
const test_step = b.step("test", "Run the tests");
test_step.dependOn(&scanner_test.step);
for (test_files) |file| {
const t = b.addTest(file);
t.setTarget(target);
t.setBuildMode(mode);
t.linkLibC();
t.linkSystemLibrary("expat");
test_step.dependOn(&t.step);
}
}
if (examples) {