зеркало из https://github.com/github/ruby.git
I finally clued into the fact that test/unit's -x was for file level filtering... so that is not going into miniunit and instead goes into test/runner.rb
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
2c59d0ee70
Коммит
c5746c45b2
|
@ -20,10 +20,29 @@ $:.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")])
|
||||
|
||||
flags, files = ARGV.partition { |arg| arg =~ /^-/ }
|
||||
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
|
||||
|
||||
test_files = test_files.grep(Regexp.union(*files)) unless files.empty?
|
||||
|
||||
ARGV.replace flags
|
||||
ARGV.replace other # this passes through to miniunit
|
||||
|
||||
test_files.each do |test|
|
||||
require test
|
||||
|
|
Загрузка…
Ссылка в новой задаче