test: accept empty skip reasons
This commit is contained in:
@@ -140,7 +140,7 @@ export fn run(tests: [](str, *fn() void)) i32 = {
|
||||
// exit status alone cannot say whether user code returned, skipped, or died.
|
||||
export fn skip(reason: str) never = {
|
||||
if (!tstactive) { abort("test.skip called outside a test"); };
|
||||
if (reason.len == 0 || reason.len > TST_CONTROL_MAX - TST_FRAME_HEADER) {
|
||||
if (reason.len > TST_CONTROL_MAX - TST_FRAME_HEADER) {
|
||||
tstwriteframe(0u8, "");
|
||||
os.exit(0);
|
||||
};
|
||||
@@ -458,7 +458,7 @@ fn tstinterpret(result: *tstresult) void = {
|
||||
};
|
||||
return;
|
||||
};
|
||||
if (code == TST_SKIPPED && payload > 0) {
|
||||
if (code == TST_SKIPPED) {
|
||||
if (result.exited && result.detail == 0) {
|
||||
result.kind = TST_SKIP;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user