mirror of
https://codeberg.org/ziglings/exercises.git
synced 2024-12-27 01:46:29 +00:00
Merge pull request #178 from chrboesch/issue176
removed trim of trailing spaces
This commit is contained in:
commit
4056f0cb21
1 changed files with 3 additions and 3 deletions
|
@ -462,7 +462,7 @@ const exercises = [_]Exercise{
|
||||||
// },
|
// },
|
||||||
.{
|
.{
|
||||||
.main_file = "999_the_end.zig",
|
.main_file = "999_the_end.zig",
|
||||||
.output = "This is the end for now!\nWe hope you had fun and were able to learn a lot, so visit us again when the next exercises are available.",
|
.output = "\nThis is the end for now!\nWe hope you had fun and were able to learn a lot, so visit us again when the next exercises are available.",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -687,9 +687,9 @@ const ZiglingStep = struct {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
const trimOutput = std.mem.trim(u8, output, " \r\n");
|
|
||||||
const trimExerciseOutput = std.mem.trim(u8, self.exercise.output, " \r\n");
|
|
||||||
// validate the output
|
// validate the output
|
||||||
|
const trimOutput = std.mem.trimRight(u8, output, " \r\n");
|
||||||
|
const trimExerciseOutput = std.mem.trimRight(u8, self.exercise.output, " \r\n");
|
||||||
if (std.mem.indexOf(u8, trimOutput, trimExerciseOutput) == null or trimOutput.len != trimExerciseOutput.len) {
|
if (std.mem.indexOf(u8, trimOutput, trimExerciseOutput) == null or trimOutput.len != trimExerciseOutput.len) {
|
||||||
print(
|
print(
|
||||||
\\
|
\\
|
||||||
|
|
Loading…
Reference in a new issue