Allow for -v and other flags to be passed through properly
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d34a75b061
commit
5b91aa9746
@ -20,7 +20,10 @@ $:.push(*Dir[File.join(test_dir, '*')].find_all { |path| File.directory? path })
|
|||||||
test_files = (Dir[File.join(test_dir, "test_*.rb")] +
|
test_files = (Dir[File.join(test_dir, "test_*.rb")] +
|
||||||
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?
|
flags, files = ARGV.partition { |arg| arg =~ /^-/ }
|
||||||
|
test_files = test_files.grep(Regexp.union(*files)) unless files.empty?
|
||||||
|
|
||||||
|
ARGV.replace flags
|
||||||
|
|
||||||
test_files.each do |test|
|
test_files.each do |test|
|
||||||
require test
|
require test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user