mirror of
https://codeberg.org/andyscott/ziglings.git
synced 2024-11-09 11:40:46 -05:00
build: improve the exercise output check
Make the error message consistent with the one in std.Build.RunStep, using the "=" character instead of "-" and correctly aligning the text.
This commit is contained in:
parent
feeba51940
commit
c6c6a32270
1 changed files with 5 additions and 5 deletions
10
build.zig
10
build.zig
|
@ -313,11 +313,11 @@ const ZiglingStep = struct {
|
|||
if (!std.mem.eql(u8, trimOutput, trimExerciseOutput)) {
|
||||
print(
|
||||
\\
|
||||
\\{s}----------- Expected this output -----------{s}
|
||||
\\"{s}"
|
||||
\\{s}----------- but found -----------{s}
|
||||
\\"{s}"
|
||||
\\{s}-----------{s}
|
||||
\\{s}========= expected this output: =========={s}
|
||||
\\{s}
|
||||
\\{s}========= but found: ====================={s}
|
||||
\\{s}
|
||||
\\{s}=========================================={s}
|
||||
\\
|
||||
, .{ red_text, reset_text, trimExerciseOutput, red_text, reset_text, trimOutput, red_text, reset_text });
|
||||
return error.InvalidOutput;
|
||||
|
|
Loading…
Reference in a new issue