Skip to content

Commit 88c12a2

Browse files
committed
Indent folded bootstraptest dots
1 parent 56f2fd3 commit 88c12a2

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

bootstraptest/runner.rb

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,27 +75,33 @@ def Dir.mktmpdir(prefix_suffix=nil, tmpdir=nil)
7575
:columns,
7676
:window_width,
7777
:width,
78+
:indent,
7879
:platform,
7980
)
8081
BT = Class.new(bt) do
82+
def indent=(n)
83+
super
84+
if (self.columns ||= 0) < n
85+
$stderr.print(' ' * (n - self.columns))
86+
end
87+
self.columns = indent
88+
end
89+
8190
def putc(c)
8291
unless self.quiet
8392
if self.window_width == nil
84-
if BT.tty
85-
unless w = ENV["COLUMNS"] and (w = w.to_i) > 0
86-
w = 80
87-
end
88-
w -= 1
89-
else
90-
w = false
93+
unless w = ENV["COLUMNS"] and (w = w.to_i) > 0
94+
w = 80
9195
end
96+
w -= 1
9297
self.window_width = w
9398
end
9499
if self.window_width and self.columns >= self.window_width
95-
$stderr.puts
96-
self.columns = 0
100+
$stderr.print "\n", " " * (self.indent ||= 0)
101+
self.columns = indent
97102
end
98103
$stderr.print c
104+
$stderr.flush
99105
self.columns += 1
100106
end
101107
end
@@ -293,7 +299,7 @@ def concurrent_exec_test
293299
end
294300
end
295301

296-
BT.putc ' '
302+
BT.indent = 1
297303
aq.close
298304
i = 1
299305
term_wn = 0

0 commit comments

Comments
 (0)