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: add support for directory name

with -p/-x options.

* test/testunit/collector/test_dir.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eban 2004-11-19 02:22:57 +00:00
parent 964171ebfa
commit e6a0f42c94
3 changed files with 11 additions and 4 deletions

View file

@ -15,7 +15,7 @@ module Test
@file = file
@object_space = object_space
@req = req
@pattern = /\Atest_.*\.rb\Z/m
@pattern = /\btest_.*\.rb\Z/m
@exclude = nil
end
@ -55,8 +55,8 @@ module Test
sub_suite = recursive_collect(e_name, already_gathered)
sub_suites << sub_suite unless(sub_suite.empty?)
else
(next unless(@pattern =~ e)) if(@pattern)
(next if(@exclude =~ e)) if(@exclude)
(next unless(@pattern =~ e_name)) if(@pattern)
(next if(@exclude =~ e_name)) if(@exclude)
collect_file(e_name, sub_suites, already_gathered)
end
end