From 716a99389c36e7e15c932f8ce4a0229b9756b185 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 14 Apr 2011 13:48:18 +0000 Subject: * lib/test/unit.rb (Test::Unit::Options#setup_options): set possible values for completion. no conversion is needed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 ++++- lib/test/unit.rb | 7 ++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 488d644e50..9b1387452c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ -Thu Apr 14 22:48:08 2011 Nobuyoshi Nakada +Thu Apr 14 22:48:12 2011 Nobuyoshi Nakada + + * lib/test/unit.rb (Test::Unit::Options#setup_options): set possible + values for completion. no conversion is needed. * lib/test/unit.rb (Test::Unit::Runner::Worker#initialize): use positional arguments instead of keyword arguments. diff --git a/lib/test/unit.rb b/lib/test/unit.rb index 9e3a23ea43..1f1bb090bc 100644 --- a/lib/test/unit.rb +++ b/lib/test/unit.rb @@ -70,7 +70,7 @@ module Test end opts.on '-s', '--seed SEED', Integer, "Sets random seed" do |m| - options[:seed] = m.to_i + options[:seed] = m end opts.on '-v', '--verbose', "Verbose. Show progress processing files." do @@ -82,8 +82,9 @@ module Test options[:filter] = a end - opts.on '--jobs-status [TYPE]', "Show status of jobs every file; Disabled when --jobs isn't specified." do |type| - options[:job_status] = (type && type.to_sym) || :normal + opts.on '--jobs-status [TYPE]', [:normal, :replace], + "Show status of jobs every file; Disabled when --jobs isn't specified." do |type| + options[:job_status] = type || :normal end opts.on '-j N', '--jobs N', "Allow run tests with N jobs at once" do |a| -- cgit v1.2.1