mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
lib/test/unit.rb: no unnecessary newlines
* lib/test/unit.rb (Test::Unit::Runner#failed): no unnecessary newlines if no reports to be displayed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c8b3528383
commit
5f58cd0906
2 changed files with 10 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
Fri May 11 09:51:07 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/test/unit.rb (Test::Unit::Runner#failed): no unnecessary
|
||||
newlines if no reports to be displayed.
|
||||
|
||||
Thu May 11 03:41:00 2012 Kenta Murata <mrkn@mrkn.jp>
|
||||
|
||||
* ext/bigdecimal/bigdecimal.c: use RB_GC_GUARD. [ruby-dev:45627]
|
||||
|
|
|
@ -685,12 +685,15 @@ module Test
|
|||
def succeed; del_status_line; end
|
||||
|
||||
def failed(s)
|
||||
$stdout.puts
|
||||
sep = "\n"
|
||||
@report_count ||= 0
|
||||
report.each do |msg|
|
||||
next if @options[:hide_skip] and msg.start_with? "Skipped:"
|
||||
msg = msg.split(/$/, 2)
|
||||
$stdout.puts "#{@failed_color}%3d) %s#{@reset_color}%s\n" % [@report_count += 1, *msg]
|
||||
$stdout.printf("%s%s%3d) %s%s%s\n",
|
||||
sep, @failed_color, @report_count += 1,
|
||||
msg[0], @reset_color, msg[1])
|
||||
sep = nil
|
||||
end
|
||||
report.clear
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue