2004-11-20 08:58:20 -05:00
|
|
|
require 'rbconfig'
|
|
|
|
exit if CROSS_COMPILING
|
2003-10-08 09:21:28 -04:00
|
|
|
require 'test/unit'
|
2003-09-04 21:47:41 -04:00
|
|
|
|
2003-09-04 22:38:33 -04:00
|
|
|
rcsid = %w$Id$
|
2003-09-04 22:57:49 -04:00
|
|
|
Version = rcsid[2].scan(/\d+/).collect!(&method(:Integer)).freeze
|
2003-09-04 22:38:33 -04:00
|
|
|
Release = rcsid[3].freeze
|
2003-09-04 21:47:41 -04:00
|
|
|
|
2008-09-23 17:39:21 -04:00
|
|
|
class Module
|
|
|
|
def tu_deprecation_warning old, new = nil, kaller = nil
|
|
|
|
# stfu - for now...
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2008-09-24 04:19:12 -04:00
|
|
|
test_dir = File.dirname(__FILE__)
|
|
|
|
|
|
|
|
# not sure why these are needed now... but whatever
|
|
|
|
$:.push(*Dir[File.join(test_dir, '*')].find_all { |path| File.directory? path })
|
|
|
|
|
|
|
|
test_files = (Dir[File.join(test_dir, "test_*.rb")] +
|
|
|
|
Dir[File.join(test_dir, "**/test_*.rb")])
|
|
|
|
|
2008-09-25 02:57:05 -04:00
|
|
|
files = []
|
|
|
|
other = []
|
|
|
|
|
|
|
|
until ARGV.empty? do
|
|
|
|
arg = ARGV.shift
|
|
|
|
case arg
|
|
|
|
when /^-x$/ then
|
|
|
|
filter = ARGV.shift
|
|
|
|
test_files.reject! { |f| f =~ /#{filter}/ }
|
|
|
|
when /^--$/ then
|
|
|
|
other.push(*ARGV)
|
|
|
|
ARGV.clear
|
|
|
|
break
|
|
|
|
when /^-/ then
|
|
|
|
other << arg
|
|
|
|
else
|
|
|
|
files << arg
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2008-09-24 04:50:16 -04:00
|
|
|
test_files = test_files.grep(Regexp.union(*files)) unless files.empty?
|
|
|
|
|
2008-09-25 02:57:05 -04:00
|
|
|
ARGV.replace other # this passes through to miniunit
|
2008-09-24 04:19:12 -04:00
|
|
|
|
|
|
|
test_files.each do |test|
|
2008-09-23 17:39:21 -04:00
|
|
|
require test
|
|
|
|
end
|