diff options
author | Koichi Sasada <[email protected]> | 2022-01-26 01:51:16 +0900 |
---|---|---|
committer | Koichi Sasada <[email protected]> | 2022-01-26 09:56:27 +0900 |
commit | e953d6865724d8b7e79aa30c445d986f28f5e1c9 (patch) | |
tree | 3b816e815638e361f8466fd3eabf980b989624d7 /bootstraptest/runner.rb | |
parent | cac6fe90236c8541059edc74080d50c49be7ea87 (diff) |
refactoring btest output
don't duplicate the message, but prepare `out` var to choose
stdout/err.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5484
Diffstat (limited to 'bootstraptest/runner.rb')
-rwxr-xr-x | bootstraptest/runner.rb | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/bootstraptest/runner.rb b/bootstraptest/runner.rb index acc113b729..a4101594f1 100755 --- a/bootstraptest/runner.rb +++ b/bootstraptest/runner.rb @@ -213,15 +213,14 @@ def exec_test(pathes) @errbuf.each do |msg| $stderr.puts msg end + + out = @quiet ? $stdout : $stderr + if @error == 0 if @count == 0 - $stderr.puts "No tests, no problem" unless @quiet + out.puts "No tests, no problem" unless @quiet else - if @quiet - $stdout.puts "#{@passed}PASS#{@reset} all #{@count} tests" - else - $stderr.puts "#{@passed}PASS#{@reset} all #{@count} tests" - end + out.puts "#{@passed}PASS#{@reset} all #{@count} tests" end exit true else |