mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Added ARGV filtering for tests. Allows for multiple values
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9aac312f77
commit
1db825a047
1 changed files with 11 additions and 4 deletions
|
@ -6,15 +6,22 @@ rcsid = %w$Id$
|
|||
Version = rcsid[2].scan(/\d+/).collect!(&method(:Integer)).freeze
|
||||
Release = rcsid[3].freeze
|
||||
|
||||
# not sure why these are needed now... but whatever
|
||||
$:.push(*Dir["test/*"].find_all { |path| File.directory? path })
|
||||
|
||||
class Module
|
||||
def tu_deprecation_warning old, new = nil, kaller = nil
|
||||
# stfu - for now...
|
||||
end
|
||||
end
|
||||
|
||||
(Dir["test/test_*.rb"] + Dir["test/**/test_*.rb"]).each do |test|
|
||||
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")])
|
||||
|
||||
test_files = test_files.grep(Regexp.union(*ARGV)) unless ARGV.empty?
|
||||
|
||||
test_files.each do |test|
|
||||
require test
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue