mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Added --base-directory option
This commit is contained in:
parent
f5ea054810
commit
4c1db84d17
1 changed files with 4 additions and 0 deletions
|
@ -856,6 +856,10 @@ module Test
|
|||
def setup_options(parser, options)
|
||||
super
|
||||
parser.separator "globbing options:"
|
||||
parser.on '-B', '--base-directory DIR', 'Base directory to glob.' do |dir|
|
||||
raise OptionParser::InvalidArgument, "not a directory: #{dir}" unless File.directory?(dir)
|
||||
options[:base_directory] = dir
|
||||
end
|
||||
parser.on '-x', '--exclude REGEXP', 'Exclude test files on pattern.' do |pattern|
|
||||
(options[:reject] ||= []) << pattern
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue