ruby-changes:46345
From: nobu <ko1@a...>
Date: Sun, 23 Apr 2017 23:51:13 +0900 (JST)
Subject: [ruby-changes:46345] nobu:r58459 (trunk): Add diagnostic reports section header [ci skip]
nobu 2017-04-23 23:51:08 +0900 (Sun, 23 Apr 2017) New Revision: 58459 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58459 Log: Add diagnostic reports section header [ci skip] Modified files: trunk/test/lib/test/unit/assertions.rb Index: test/lib/test/unit/assertions.rb =================================================================== --- test/lib/test/unit/assertions.rb (revision 58458) +++ test/lib/test/unit/assertions.rb (revision 58459) @@ -552,11 +552,11 @@ EOT https://github.com/ruby/ruby/blob/trunk/test/lib/test/unit/assertions.rb#L552 full_message << " exit #{status.exitstatus}" if status.exited? full_message << " killed by #{sigdesc}" if sigdesc if out and !out.empty? - full_message << "\n#{out.b.gsub(/^/, '| ')}" - full_message << "\n" if /\n\z/ !~ full_message + full_message << "\n" << out.b.gsub(/^/, '| ') + full_message.sub!(/(?<!\n)\z/, "\n") end if log - full_message << "\n#{log.b.gsub(/^/, '| ')}" + full_message << "Diagnostic reports:\n" << log.b.gsub(/^/, '| ') end full_message end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/