ruby-changes:73834
From: Nobuyoshi <ko1@a...>
Date: Sat, 1 Oct 2022 18:54:17 +0900 (JST)
Subject: [ruby-changes:73834] 88c12a2937 (master): Indent folded bootstraptest dots
https://git.ruby-lang.org/ruby.git/commit/?id=88c12a2937 From 88c12a29372e3f908190c6af0aa1b2ac6b78fbd1 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sat, 1 Oct 2022 18:18:58 +0900 Subject: Indent folded bootstraptest dots --- bootstraptest/runner.rb | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/bootstraptest/runner.rb b/bootstraptest/runner.rb index e7f4fb69fb..1d219be71e 100755 --- a/bootstraptest/runner.rb +++ b/bootstraptest/runner.rb @@ -75,27 +75,33 @@ bt = Struct.new(:ruby, https://github.com/ruby/ruby/blob/trunk/bootstraptest/runner.rb#L75 :columns, :window_width, :width, + :indent, :platform, ) BT = Class.new(bt) do + def indent=(n) + super + if (self.columns ||= 0) < n + $stderr.print(' ' * (n - self.columns)) + end + self.columns = indent + end + def putc(c) unless self.quiet if self.window_width == nil - if BT.tty - unless w = ENV["COLUMNS"] and (w = w.to_i) > 0 - w = 80 - end - w -= 1 - else - w = false + unless w = ENV["COLUMNS"] and (w = w.to_i) > 0 + w = 80 end + w -= 1 self.window_width = w end if self.window_width and self.columns >= self.window_width - $stderr.puts - self.columns = 0 + $stderr.print "\n", " " * (self.indent ||= 0) + self.columns = indent end $stderr.print c + $stderr.flush self.columns += 1 end end @@ -293,7 +299,7 @@ def concurrent_exec_test https://github.com/ruby/ruby/blob/trunk/bootstraptest/runner.rb#L299 end end - BT.putc ' ' + BT.indent = 1 aq.close i = 1 term_wn = 0 -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/