Project

General

Profile

Feature #4893 » test_runner_String_initialize.diff

modification of ./test/runner.rb (for make test-all) - lazaridis.com (Lazaridis Ilias), 07/03/2011 01:35 AM

View differences:

"b/P:\\sand\\rubyi2\\sandbox\\ruby193\\test\\runner.rb"
require_relative 'profile_test_all' if ENV['RUBY_TEST_ALL_PROFILE'] == 'true'
exit Test::Unit::AutoRunner.run(true, src_testdir)
#alter String class prior to go into test-all
class String
@@running_counter = 0
alias :orig_initialize :initialize
def initialize(*args)
orig_initialize(*args)
@@running_counter += 1
end
def self.running_counter
@@running_counter
end
end
String.call_initialize = true
a = "literalstring" #counter becomes 1
puts "\n#{String.call_initialize} #{String.running_counter} - START test/runner.rb MODIFIED TEST"
exitval = Test::Unit::AutoRunner.run(true, src_testdir)
puts "\n#{String.call_initialize} #{String.running_counter} - EXIT test/runner.rb MODIFIED TEST"
exit exitval
(7-7/13)