summaryrefslogtreecommitdiffstats
path: root/test/runner.rb
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
commit75d17648a8c0f3f0d4c4019ec13425968edd780c (patch)
treea2d2ddab2a0021dbb214196ee05202f834f53051 /test/runner.rb
parent30e479d43f2bb32b5f1f081d61084495e0e865d4 (diff)
downloadruby-75d17648a8c0f3f0d4c4019ec13425968edd780c.tar.gz
ruby-75d17648a8c0f3f0d4c4019ec13425968edd780c.tar.xz
ruby-75d17648a8c0f3f0d4c4019ec13425968edd780c.zip
Allow for -v and other flags to be passed through properly
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/runner.rb')
-rw-r--r--test/runner.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/runner.rb b/test/runner.rb
index fcbd15165..0c89c0c76 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