1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/test/unit/collector/dir.rb (recursive_collect): do not always

include all test_*.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2008-03-01 08:51:37 +00:00
parent e31eeedb94
commit cce9eb092b
2 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Sat Mar 1 17:51:34 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/test/unit/collector/dir.rb (recursive_collect): do not always
include all test_*.rb.
Sat Mar 1 14:14:17 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* development snapshot 1.9.0-1 released.

View file

@ -16,7 +16,7 @@ module Test
@file = file
@object_space = object_space
@req = req
@pattern = [/\btest_.*\.rb\Z/m]
@pattern = []
@exclude = []
end
@ -59,11 +59,12 @@ module Test
next if(e == '.' || e == '..')
e_name = dir_name ? @file.join(dir_name, e) : e
if @file.directory?(realdir(e_name))
next if /\ACVS\z/ =~ e
next if /\A(?:CVS|\.svn)\z/ =~ e
sub_suite = recursive_collect(e_name, already_gathered)
sub_suites << sub_suite unless(sub_suite.empty?)
else
next if /~\z/ =~ e_name or /\A\.\#/ =~ e
next unless /\Atest_.*\.rb\z/m =~ e
if @pattern and !@pattern.empty?
next unless @pattern.any? {|pat| pat =~ e_name}
end