mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fixed missing test/unit.rb, bad svn merge. Rolled back test/runner.rb
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
176fda7c02
commit
8673d9a5a8
2 changed files with 281 additions and 43 deletions
|
@ -6,46 +6,4 @@ rcsid = %w$Id$
|
|||
Version = rcsid[2].scan(/\d+/).collect!(&method(:Integer)).freeze
|
||||
Release = rcsid[3].freeze
|
||||
|
||||
class Module
|
||||
def tu_deprecation_warning old, new = nil, kaller = nil
|
||||
# stfu - for now...
|
||||
end
|
||||
end
|
||||
|
||||
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")])
|
||||
|
||||
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 /^-(n|-name)$/ then
|
||||
other.push arg, ARGV.shift
|
||||
when /^-/ then
|
||||
other << arg
|
||||
else
|
||||
files << arg
|
||||
end
|
||||
end
|
||||
|
||||
test_files = test_files.grep(Regexp.union(*files)) unless files.empty?
|
||||
|
||||
ARGV.replace other # this passes through to miniunit
|
||||
|
||||
test_files.each do |test|
|
||||
require test
|
||||
end
|
||||
exit Test::Unit::AutoRunner.run(true, File.dirname($0))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue