add check for trailing output characters

This commit is contained in:
Tobias Simetsreiter 2022-11-16 12:36:31 +01:00
parent 5a920ac48c
commit 980a278ccc

View file

@ -683,7 +683,7 @@ const ZiglingStep = struct {
}
// validate the output
if (std.mem.indexOf(u8, output, self.exercise.output) == null) {
if (std.mem.indexOf(u8, output, self.exercise.output) == null or output.len != self.exercise.output.len) {
print(
\\
\\{s}----------- Expected this output -----------{s}