summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorryan <ryan@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-24 08:50:16 +0000
committerryan <ryan@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-24 08:50:16 +0000
commit5b91aa974658423d2b765d3b1145e452c0d1fff3 (patch)
treea2d2ddab2a0021dbb214196ee05202f834f53051 /test
parentd34a75b061c59f23da65c4d0aae31231b62cdd2f (diff)
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
Diffstat (limited to 'test')
-rw-r--r--test/runner.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/runner.rb b/test/runner.rb
index fcbd151654..0c89c0c76e 100644
--- a/test/runner.rb
+++ b/test/runner.rb
@@ -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")] +
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|
require test