mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 22:35:24 +00:00
testing: Avoid printing expected line twice
When the line has trailing whitespace we already print it with a carriage return symbol at the end, don't print it one more time.
This commit is contained in:
parent
1943c2dc68
commit
b0e905a30d
@ -439,7 +439,7 @@ fn printWithVisibleNewlines(source: []const u8) void {
|
||||
|
||||
fn printLine(line: []const u8) void {
|
||||
if (line.len != 0) switch (line[line.len - 1]) {
|
||||
' ', '\t' => print("{s}⏎\n", .{line}), // Carriage return symbol,
|
||||
' ', '\t' => return print("{s}⏎\n", .{line}), // Carriage return symbol,
|
||||
else => {},
|
||||
};
|
||||
print("{s}\n", .{line});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user