diff options
author | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-19 02:22:57 +0000 |
---|---|---|
committer | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-19 02:22:57 +0000 |
commit | e6a0f42c9462e8f7d1a70b94c2428657d5cb9874 (patch) | |
tree | 6557f7d5f1233e490d4482ae358a5aff4d3cf390 /lib/test/unit | |
parent | 964171ebfaf84e79f61ef45f2f11e9cd7b22d2a5 (diff) | |
download | ruby-e6a0f42c9462e8f7d1a70b94c2428657d5cb9874.tar.gz |
* 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
Diffstat (limited to 'lib/test/unit')
-rw-r--r-- | lib/test/unit/collector/dir.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/test/unit/collector/dir.rb b/lib/test/unit/collector/dir.rb index 1d65132a45..b7927b867f 100644 --- a/lib/test/unit/collector/dir.rb +++ b/lib/test/unit/collector/dir.rb @@ -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 |