mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/test/unit/autorunner.rb (Test::Unit::AutoRunner::options): add
new option --exclude (-x) to skip some tests. * lib/test/unit/collector/dir.rb (Test::Unit::Collector::Dir.exclude): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6116dd832c
commit
c2b7884076
3 changed files with 18 additions and 2 deletions
|
@ -7,7 +7,7 @@ module Test
|
|||
class Dir
|
||||
include Collector
|
||||
|
||||
attr_writer :pattern
|
||||
attr_writer :pattern, :exclude
|
||||
|
||||
def initialize(dir=::Dir, file=::File, object_space=::ObjectSpace, req=nil)
|
||||
super()
|
||||
|
@ -16,6 +16,7 @@ module Test
|
|||
@object_space = object_space
|
||||
@req = req
|
||||
@pattern = /\Atest_.*\.rb\Z/m
|
||||
@exclude = nil
|
||||
end
|
||||
|
||||
def collect(*from)
|
||||
|
@ -55,6 +56,7 @@ module Test
|
|||
sub_suites << sub_suite unless(sub_suite.empty?)
|
||||
else
|
||||
(next unless(@pattern =~ e)) if(@pattern)
|
||||
(next if(@exclude =~ e)) if(@exclude)
|
||||
collect_file(e_name, sub_suites, already_gathered)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue