ruby-changes:8570
From: usa <ko1@a...>
Date: Tue, 4 Nov 2008 13:09:27 +0900 (JST)
Subject: [ruby-changes:8570] Ruby:r20105 (trunk): * lib/test/unit.rb (Test::Unit.setup_argv): now can specify ``-xname''
usa 2008-11-04 13:09:10 +0900 (Tue, 04 Nov 2008) New Revision: 20105 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=20105 Log: * lib/test/unit.rb (Test::Unit.setup_argv): now can specify ``-xname'' instead of ``-x name''. Modified files: trunk/ChangeLog trunk/lib/test/unit.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 20104) +++ ChangeLog (revision 20105) @@ -1,3 +1,8 @@ +Tue Nov 4 13:08:01 2008 NAKAMURA Usaku <usa@r...> + + * lib/test/unit.rb (Test::Unit.setup_argv): now can specify ``-xname'' + instead of ``-x name''. + Tue Nov 4 08:00:00 2008 TAKANO Mitsuhiro (takano32) <tak@n...> * test/zlib/test_zlib.rb(test_readchar): compare in same type. Index: lib/test/unit.rb =================================================================== --- lib/test/unit.rb (revision 20104) +++ lib/test/unit.rb (revision 20105) @@ -15,12 +15,13 @@ while arg = original_argv.shift case arg when '-v' - minitest_argv << '-v' - when '-n', '--name' minitest_argv << arg - minitest_argv << original_argv.shift - when '-x' - reject << original_argv.shift + when /\A(-n)(.+)?/, /\A(--name)=?\b(.+)?/ + p [$1, $2] + minitest_argv << $1 + minitest_argv << ($2 || original_argv.shift) + when /\A-x(.+)?/ + reject << ($1 || original_argv.shift) else files << arg end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/