authorgravatar for xq@random-projects.netFelix "xq" Queißner <xq@random-projects.net> 2020-09-03 17:48:17+02:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-09-03 18:07:30-04:00
log88724b2a89157ecc3a8eea03aa0f8a6b66829915
tree13e2a2c87ef01627388bcec7bdbb8c51199bcf8b
parent10344591704b9d7317eeaca44681eabd769c4486

Introduces a space after the ellipsis for test and progress.


2 files changed, 4 insertions(+), 4 deletions(-)

lib/std/progress.zig+3-3
...@@ -197,7 +197,7 @@ pub const Progress = struct {...@@ -197,7 +197,7 @@ pub const Progress = struct {
197 var maybe_node: ?*Node = &self.root;197 var maybe_node: ?*Node = &self.root;
198 while (maybe_node) |node| {198 while (maybe_node) |node| {
199 if (need_ellipse) {199 if (need_ellipse) {
200 self.bufWrite(&end, "...", .{});200 self.bufWrite(&end, "... ", .{});
201 }201 }
202 need_ellipse = false;202 need_ellipse = false;
203 if (node.name.len != 0 or node.estimated_total_items != null) {203 if (node.name.len != 0 or node.estimated_total_items != null) {
...@@ -218,7 +218,7 @@ pub const Progress = struct {...@@ -218,7 +218,7 @@ pub const Progress = struct {
218 maybe_node = node.recently_updated_child;218 maybe_node = node.recently_updated_child;
219 }219 }
220 if (need_ellipse) {220 if (need_ellipse) {
221 self.bufWrite(&end, "...", .{});221 self.bufWrite(&end, "... ", .{});
222 }222 }
223 }223 }
224224
...@@ -253,7 +253,7 @@ pub const Progress = struct {...@@ -253,7 +253,7 @@ pub const Progress = struct {
253 const bytes_needed_for_esc_codes_at_end = if (std.builtin.os.tag == .windows) 0 else 11;253 const bytes_needed_for_esc_codes_at_end = if (std.builtin.os.tag == .windows) 0 else 11;
254 const max_end = self.output_buffer.len - bytes_needed_for_esc_codes_at_end;254 const max_end = self.output_buffer.len - bytes_needed_for_esc_codes_at_end;
255 if (end.* > max_end) {255 if (end.* > max_end) {
256 const suffix = "...";256 const suffix = "... ";
257 self.columns_written = self.columns_written - (end.* - max_end) + suffix.len;257 self.columns_written = self.columns_written - (end.* - max_end) + suffix.len;
258 std.mem.copy(u8, self.output_buffer[max_end..], suffix);258 std.mem.copy(u8, self.output_buffer[max_end..], suffix);
259 end.* = max_end + suffix.len;259 end.* = max_end + suffix.len;
lib/std/special/test_runner.zig+1-1
...@@ -40,7 +40,7 @@ pub fn main() anyerror!void {...@@ -40,7 +40,7 @@ pub fn main() anyerror!void {
40 test_node.activate();40 test_node.activate();
41 progress.refresh();41 progress.refresh();
42 if (progress.terminal == null) {42 if (progress.terminal == null) {
43 std.debug.print("{}/{} {}...", .{ i + 1, test_fn_list.len, test_fn.name });43 std.debug.print("{}/{} {}... ", .{ i + 1, test_fn_list.len, test_fn.name });
44 }44 }
45 const result = if (test_fn.async_frame_size) |size| switch (io_mode) {45 const result = if (test_fn.async_frame_size) |size| switch (io_mode) {
46 .evented => blk: {46 .evented => blk: {