aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Boesch <[email protected]>2023-02-02 10:45:25 +0100
committerGitHub <[email protected]>2023-02-02 10:45:25 +0100
commit4056f0cb21a173002fdeee7e6a7030dd480dde3e (patch)
tree3184d693bb650360d881d5c0aee70cc5bd26969c
parente95f96659137162be797d7757eb48fae6119d19e (diff)
parent45aa55404657e17d3298db44087b9f7f384f4c8e (diff)
downloadziglings-4056f0cb21a173002fdeee7e6a7030dd480dde3e.tar.xz
ziglings-4056f0cb21a173002fdeee7e6a7030dd480dde3e.zip
Merge pull request #178 from chrboesch/issue176
removed trim of trailing spaces
-rw-r--r--build.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/build.zig b/build.zig
index 3b0ac71..045353e 100644
--- a/build.zig
+++ b/build.zig
@@ -462,7 +462,7 @@ const exercises = [_]Exercise{
// },
.{
.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
+ 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) {
print(
\\