diff --git "a/C:\\Users\\LAZARI~1\\AppData\\Local\\Temp\\run4B67.rb" "b/P:\\sand\\rubyi2\\sandbox\\rb192\\bootstraptest\\runner.rb" index 9d98afc..5dfde2c 100644 --- "a/C:\\Users\\LAZARI~1\\AppData\\Local\\Temp\\run4B67.rb" +++ "b/P:\\sand\\rubyi2\\sandbox\\rb192\\bootstraptest\\runner.rb" @@ -7,6 +7,22 @@ # 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' @@ -133,6 +149,7 @@ def exec_test(pathes) @error = 0 @errbuf = [] @location = nil + @exitval = nil pathes.each do |path| $stderr.print "\n#{File.basename(path)} " load File.expand_path(path) @@ -144,14 +161,19 @@ def exec_test(pathes) 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 = '')