From 5e4657d3f7af84a0507eb341d7c51f6b9215295e Mon Sep 17 00:00:00 2001 From: Stefan Schindler Date: Mon, 16 Aug 2021 20:40:23 +0200 Subject: [PATCH] Fix double output of the summary line --- src/tools/rustdoc-gui/tester.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/tools/rustdoc-gui/tester.js b/src/tools/rustdoc-gui/tester.js index 4e77d27d399..d1cf5fb803d 100644 --- a/src/tools/rustdoc-gui/tester.js +++ b/src/tools/rustdoc-gui/tester.js @@ -93,8 +93,13 @@ function char_printer(n_tests) { } }, finish: function() { - const spaces = " ".repeat(max_per_line - (current % max_per_line)); - process.stdout.write(`${spaces} (${current}/${n_tests})${os.EOL}${os.EOL}`); + if (current % max_per_line === 0) { + // Don't output if we are already at a matching line end + console.log(""); + } else { + const spaces = " ".repeat(max_per_line - (current % max_per_line)); + process.stdout.write(`${spaces} (${current}/${n_tests})${os.EOL}${os.EOL}`); + } }, }; }