From 81ab96d12f5a0b35454597d0660602baba21063e Mon Sep 17 00:00:00 2001 From: eban Date: Fri, 19 Nov 2004 02:22:57 +0000 Subject: * 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: http://svn.ruby-lang.org/repos/ruby/trunk@7317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/test/unit/collector/dir.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/test') diff --git a/lib/test/unit/collector/dir.rb b/lib/test/unit/collector/dir.rb index 1d65132a4..b7927b867 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 -- cgit