File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1181,7 +1181,9 @@ fn evalZigTest(
11811181
11821182 if (tr_hdr .flags .fail or tr_hdr .flags .leak or tr_hdr .flags .log_err_count > 0 ) {
11831183 const name = std .mem .sliceTo (md .string_bytes [md .names [tr_hdr .index ].. ], 0 );
1184- const msg = std .mem .trim (u8 , stderr .readableSlice (0 ), "\n " );
1184+ const orig_msg = stderr .readableSlice (0 );
1185+ defer stderr .discard (orig_msg .len );
1186+ const msg = std .mem .trim (u8 , orig_msg , "\n " );
11851187 const label = if (tr_hdr .flags .fail )
11861188 "failed"
11871189 else if (tr_hdr .flags .leak )
@@ -1195,7 +1197,6 @@ fn evalZigTest(
11951197 } else {
11961198 try self .step .addError ("'{s}' {s}" , .{ name , label });
11971199 }
1198- stderr .discard (msg .len );
11991200 }
12001201
12011202 try requestNextTest (child .stdin .? , & metadata .? , & sub_prog_node );
You can’t perform that action at this time.
0 commit comments