Feature #4893 » bootstraptest_runner_addition.diff
"b/P:\\sand\\rubyi2\\sandbox\\rb192\\bootstraptest\\runner.rb" | ||
---|---|---|
# Never use test/unit in this file.
|
||
# Never use Ruby extensions in this file.
|
||
class String
|
||
@@running_counter = 0
|
||
def initialize(val)
|
||
@@running_counter += 1
|
||
end
|
||
def self.running_counter
|
||
@@running_counter
|
||
end
|
||
end
|
||
String.call_initialize = true
|
||
p String.call_initialize
|
||
p "TEST TEST"
|
||
p String.running_counter
|
||
begin
|
||
require 'fileutils'
|
||
require 'tmpdir'
|
||
... | ... | |
@error = 0
|
||
@errbuf = []
|
||
@location = nil
|
||
@exitval = nil
|
||
pathes.each do |path|
|
||
$stderr.print "\n#{File.basename(path)} "
|
||
load File.expand_path(path)
|
||
... | ... | |
else
|
||
$stderr.puts "PASS all #{@count} tests"
|
||
end
|
||
exit true
|
||
@exitval = true
|
||
else
|
||
@errbuf.each do |msg|
|
||
$stderr.puts msg
|
||
end
|
||
$stderr.puts "FAIL #{@error}/#{@count} tests failed"
|
||
exit false
|
||
|
||
@exitval = false
|
||
end
|
||
|
||
puts "\nTEST END, String running counter: #{String.running_counter}"
|
||
|
||
exit @exitval
|
||
end
|
||
def assert_check(testsrc, message = '', opt = '')
|