1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Try to test with rake-13.0.2 again.

[ruby/fileutils] Make verbose output go to stdout instead of stderr

  This reverts commit 510df47f5f.
This commit is contained in:
Hiroshi SHIBATA 2020-12-19 16:53:18 +09:00
parent bdd18090ad
commit 349e79bae0
No known key found for this signature in database
GPG key ID: F9CF13417264FAC2
2 changed files with 6 additions and 6 deletions

View file

@ -1623,7 +1623,7 @@ module FileUtils
def fu_output_message(msg) #:nodoc: def fu_output_message(msg) #:nodoc:
output = @fileutils_output if defined?(@fileutils_output) output = @fileutils_output if defined?(@fileutils_output)
output ||= $stderr output ||= $stdout
if defined?(@fileutils_label) if defined?(@fileutils_label)
msg = @fileutils_label + msg msg = @fileutils_label + msg
end end

View file

@ -1748,16 +1748,16 @@ class TestFileUtils < Test::Unit::TestCase
o.extend(FileUtils) o.extend(FileUtils)
o.singleton_class.send(:public, :chdir) o.singleton_class.send(:public, :chdir)
o.freeze o.freeze
orig_stderr = $stderr orig_stdout = $stdout
$stderr = StringIO.new $stdout = StringIO.new
o.chdir('.', verbose: true){} o.chdir('.', verbose: true){}
$stderr.rewind $stdout.rewind
assert_equal(<<-END, $stderr.read) assert_equal(<<-END, $stdout.read)
cd . cd .
cd - cd -
END END
ensure ensure
$stderr = orig_stderr if orig_stderr $stdout = orig_stdout if orig_stdout
end end
def test_getwd def test_getwd