ww test: report no tests to run

This commit is contained in:
2026-08-21 16:15:12 +09:00
parent 2387d3e2d2
commit 17b2879c3e
6 changed files with 443 additions and 24 deletions

View File

@@ -116,8 +116,7 @@ export fn run(tests: [](str, *fn() void)) i32 = {
return 0;
};
if (selected == 0) {
if (pkgprefix.len != 0) { tstputs("[no matches]\n"); }
else { tstputs("No tests run\n"); };
tsterrputs("testing: warning: no tests to run\n");
tstputaccounting(tests.len, 0, 0, 0);
return 0;
};
@@ -626,6 +625,10 @@ fn tstputs(s: str) void = {
tstfdwriteall(os.STDOUT_FILENO, s.ptr, s.len: u64);
};
fn tsterrputs(s: str) void = {
tstfdwriteall(os.STDERR_FILENO, s.ptr, s.len: u64);
};
fn tstputuint(n: i32) void = {
let buf: [16]u8;
let i: i32 = 16;