From 5b91aa974658423d2b765d3b1145e452c0d1fff3 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 24 Sep 2008 08:50:16 +0000 Subject: [PATCH] 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 --- test/runner.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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