ruby-changes:8016
From: ryan <ko1@a...>
Date: Thu, 25 Sep 2008 15:57:11 +0900 (JST)
Subject: [ruby-changes:8016] Ruby:r19541 (trunk): I finally clued into the fact that test/unit's -x was for file level filtering... so that is not going into miniunit and instead goes into test/runner.rb
ryan 2008-09-25 15:57:05 +0900 (Thu, 25 Sep 2008) New Revision: 19541 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=19541 Log: I finally clued into the fact that test/unit's -x was for file level filtering... so that is not going into miniunit and instead goes into test/runner.rb Modified files: trunk/test/runner.rb Index: test/runner.rb =================================================================== --- test/runner.rb (revision 19540) +++ test/runner.rb (revision 19541) @@ -20,10 +20,29 @@ test_files = (Dir[File.join(test_dir, "test_*.rb")] + Dir[File.join(test_dir, "**/test_*.rb")]) -flags, files = ARGV.partition { |arg| arg =~ /^-/ } +files = [] +other = [] + +until ARGV.empty? do + arg = ARGV.shift + case arg + when /^-x$/ then + filter = ARGV.shift + test_files.reject! { |f| f =~ /#{filter}/ } + when /^--$/ then + other.push(*ARGV) + ARGV.clear + break + when /^-/ then + other << arg + else + files << arg + end +end + test_files = test_files.grep(Regexp.union(*files)) unless files.empty? -ARGV.replace flags +ARGV.replace other # this passes through to miniunit test_files.each do |test| require test -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/