1
0
Fork 0
mirror of https://codeberg.org/ziglings/exercises.git synced 2025-06-08 01:57:02 +09:00

build: make Exercise.hint optional

Use an optional type, instead of an empty string, since it is more
idiomatic.
This commit is contained in:
Manlio Perillo 2023-05-06 11:50:42 +02:00
parent 1c73ad29a7
commit be43e2d010
2 changed files with 6 additions and 12 deletions

View file

@ -175,7 +175,7 @@ pub fn addCliTests(b: *std.Build, exercises: []const Exercise) *Step {
const cmd = b.addSystemCommand(&.{ b.zig_exe, "build", "-Dn=1" });
cmd.setName("zig build -Dn=1");
cmd.expectExitCode(1);
expectStdErrMatch(cmd, exercises[0].hint);
expectStdErrMatch(cmd, exercises[0].hint orelse "");
cmd.step.dependOn(case_step);