* test/lib/minitest/unit.rb: Show leaked tempfiles line-by-line.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2014-05-25 16:03:23 +00:00
Родитель 8735e21fbb
Коммит b5d3b55bb7
2 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -1,3 +1,7 @@
Mon May 26 01:02:09 2014 Tanaka Akira <akr@fsij.org>
* test/lib/minitest/unit.rb: Show leaked tempfiles line-by-line.
Sun May 25 23:02:06 2014 Tanaka Akira <akr@fsij.org> Sun May 25 23:02:06 2014 Tanaka Akira <akr@fsij.org>
* test/lib/minitest/unit.rb (MiniTest::Assertions#diff): Remove * test/lib/minitest/unit.rb (MiniTest::Assertions#diff): Remove

Просмотреть файл

@ -998,8 +998,10 @@ module MiniTest
end end
tempfile_retained = live2 - live1 tempfile_retained = live2 - live1
if !tempfile_retained.empty? if !tempfile_retained.empty?
list = tempfile_retained.map {|t| ' ' + t.inspect }.sort.join list = tempfile_retained.map {|t| ' ' + t.inspect }.sort
puts "Leaked tempfiles: #{name}:#{list}" list.each {|str|
puts "Leaked tempfile: #{name}: #{str}"
}
tempfile_retained.each {|t| t.unlink } tempfile_retained.each {|t| t.unlink }
end end
live2 live2