1
0
Fork 0
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:
Nobuyoshi Nakada 2019-07-25 16:45:18 +09:00
parent f5ea054810
commit 4c1db84d17
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -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