Feature #1599
closed
ruby test_foo.rb --help do not show help message
Added by okkez (okkez _) over 15 years ago.
Updated over 13 years ago.
Description
=begin
I execute below command.
I think it shows help messages, but execute tests only.
$ ruby test_foo.rb --help
For convenience, I want it to show help messages.
Why not use optparse library?¶
=end
=begin
Then what should this produce?
$ ruby which gem
--help
=end
=begin
+1
having mini test tests output help information would be great.
-=r
=end
=begin
help message with --help is good.
But don't use optparse to keeptest system small.
=end
- Assignee set to matz (Yukihiro Matsumoto)
- Assignee changed from matz (Yukihiro Matsumoto) to zenspider (Ryan Davis)
=begin
Hi,
I execute below command.
I think it shows help messages, but execute tests only.
$ ruby test_foo.rb --help
For convenience, I want it to show help messages.
Ryan, what do you think about this feature request?
diff --git a/lib/minitest/unit.rb b/lib/minitest/unit.rb
index 1570b7f..67b789a 100644
--- a/lib/minitest/unit.rb
+++ b/lib/minitest/unit.rb
@@ -383,15 +383,25 @@ module MiniTest
# Top level driver, controls all output and filtering.
def run args = []
-
@verbose = args.delete('-v')
-
-
filter = if args.first =~ /^(-n|--name)$/ then
-
args.shift
-
arg = args.shift
-
arg =~ /\/(.*)\// ? Regexp.new($1) : arg
-
else
-
/./ # anything - ^test_ already filtered by #tests
-
end
+usage: ruby #{ $0 }
--
Yusuke Endoh mame@tsg.ne.jp
=end
=begin
On Mar 21, 2010, at 20:00 , Yusuke Endoh wrote:
Issue #1599 has been updated by Yusuke Endoh.
Assigned to changed from Yukihiro Matsumoto to Ryan Davis
Hi,
I execute below command.
I think it shows help messages, but execute tests only.
$ ruby test_foo.rb --help
For convenience, I want it to show help messages.
Ryan, what do you think about this feature request?
Sorry I took so long to get back to you.
I've already implemented this in minitest w/ OptionParser. I just released minitest (and a bunch of other stuff) and also imported it into ruby-trunk.
Thanks
=end
- Status changed from Open to Closed
Also available in: Atom
PDF
Like0
Like0Like0Like0Like0Like0Like0Like0