ruby-changes:26323
From: nobu <ko1@a...>
Date: Fri, 14 Dec 2012 14:59:28 +0900 (JST)
Subject: [ruby-changes:26323] nobu:r38374 (trunk): envutil.rb: count assertions
nobu 2012-12-14 14:58:41 +0900 (Fri, 14 Dec 2012) New Revision: 38374 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38374 Log: envutil.rb: count assertions * test/ruby/envutil.rb (Test::Unit::Assertions#assert_separately): count assertions in separated tests. Modified files: trunk/ChangeLog trunk/test/ruby/envutil.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 38373) +++ ChangeLog (revision 38374) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Fri Dec 14 14:58:37 2012 Nobuyoshi Nakada <nobu@r...> + + * test/ruby/envutil.rb (Test::Unit::Assertions#assert_separately): + count assertions in separated tests. + Fri Dec 14 14:16:42 2012 Eric Hodel <drbrain@s...> * lib/rdoc/rubygems_hook.rb: Fixed generation of documentation. Index: test/ruby/envutil.rb =================================================================== --- test/ruby/envutil.rb (revision 38373) +++ test/ruby/envutil.rb (revision 38374) @@ -198,10 +198,11 @@ module Test https://github.com/ruby/ruby/blob/trunk/test/ruby/envutil.rb#L198 src = <<eom require 'test/unit';include Test::Unit::Assertions;begin;#{src} ensure - print [Marshal.dump($!)].pack('m') + puts [Marshal.dump($!)].pack('m'), "assertions=\#{self._assertions}" end eom stdout, _stderr, _status = EnvUtil.invoke_ruby(args, src, true, true, opt) + self._assertions += stdout[/^assertions=(\d+)/, 1].to_i res = Marshal.load(stdout.unpack("m")[0]) return unless res res.backtrace.each do |l| -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/