ruby-changes:56657
From: Nobuyoshi <ko1@a...>
Date: Thu, 25 Jul 2019 17:01:05 +0900 (JST)
Subject: [ruby-changes:56657] Nobuyoshi Nakada: 4c1db84d17 (master): Added --base-directory option
https://git.ruby-lang.org/ruby.git/commit/?id=4c1db84d17 From 4c1db84d1748b56334da8293ee328186fcb08162 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Thu, 25 Jul 2019 16:45:18 +0900 Subject: Added --base-directory option diff --git a/tool/lib/test/unit.rb b/tool/lib/test/unit.rb index 9cded97..a3e41a8 100644 --- a/tool/lib/test/unit.rb +++ b/tool/lib/test/unit.rb @@ -856,6 +856,10 @@ module Test https://github.com/ruby/ruby/blob/trunk/tool/lib/test/unit.rb#L856 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 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/