mirror of
https://codeberg.org/andyscott/ziglings.git
synced 2024-12-22 22:13:11 -05:00
trim of leading spaces added
This commit is contained in:
parent
ce8102f830
commit
7fb9b199a3
1 changed files with 3 additions and 3 deletions
|
@ -8,7 +8,7 @@ const print = std.debug.print;
|
||||||
// When changing this version, be sure to also update README.md in two places:
|
// When changing this version, be sure to also update README.md in two places:
|
||||||
// 1) Getting Started
|
// 1) Getting Started
|
||||||
// 2) Version Changes
|
// 2) Version Changes
|
||||||
const needed_version = std.SemanticVersion.parse("0.10.0-dev.3978") catch unreachable;
|
const needed_version = std.SemanticVersion.parse("0.11.0-dev.1302") catch unreachable;
|
||||||
|
|
||||||
const Exercise = struct {
|
const Exercise = struct {
|
||||||
/// main_file must have the format key_name.zig.
|
/// main_file must have the format key_name.zig.
|
||||||
|
@ -683,8 +683,8 @@ const ZiglingStep = struct {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
const trimOutput = std.mem.trimRight(u8, output, " \r\n");
|
const trimOutput = std.mem.trim(u8, output, " \r\n");
|
||||||
const trimExerciseOutput = std.mem.trimRight(u8, self.exercise.output, " \r\n");
|
const trimExerciseOutput = std.mem.trim(u8, self.exercise.output, " \r\n");
|
||||||
// validate the output
|
// validate the output
|
||||||
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