aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/build.zig
diff options
context:
space:
mode:
authorManlio Perillo <manlio.perillo@gmail.com>2023-05-03 14:39:42 +0200
committerManlio Perillo <manlio.perillo@gmail.com>2023-05-03 18:13:55 +0200
commitc6c6a32270d63a2efdedea02305bc284046a63af (patch)
tree6bd6f6a3369be1b12769b8e9c4c861785855d7e3 /build.zig
parentfeeba51940fa52835c69f22b7694ffeea8f1cc08 (diff)
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.
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/build.zig b/build.zig
index 29d4487..c9914e0 100644
--- a/build.zig
+++ b/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;