Browse Source

add check for trailing output characters

Tobias Simetsreiter 2 years ago
parent
commit
980a278ccc
1 changed files with 1 additions and 1 deletions
  1. 1 1
      build.zig

+ 1 - 1
build.zig

@@ -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}