1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/rake.rb, lib/rake/*.rb: Upgrade to rake-10.3.2

[fix GH-668]
* test/rake/*.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
hsbt 2014-07-15 03:07:37 +00:00
parent 031e1570b9
commit 6361928083
63 changed files with 1077 additions and 307 deletions

View file

@ -111,14 +111,23 @@ class TestRakeApplicationOptions < Rake::TestCase
end
def test_jobs
flags([]) do |opts|
assert_nil opts.thread_pool_size
end
flags(['--jobs', '0'], ['-j', '0']) do |opts|
assert_equal 0, opts.thread_pool_size
end
flags(['--jobs', '1'], ['-j', '1']) do |opts|
assert_equal 0, opts.thread_pool_size
end
flags(['--jobs', '4'], ['-j', '4']) do |opts|
assert_equal 4, opts.thread_pool_size
assert_equal 3, opts.thread_pool_size
end
flags(['--jobs', 'asdas'], ['-j', 'asdas']) do |opts|
assert_equal 2, opts.thread_pool_size
assert_equal Rake.suggested_thread_count-1, opts.thread_pool_size
end
flags('--jobs', '-j') do |opts|
assert_equal 2, opts.thread_pool_size
assert opts.thread_pool_size > 1_000_000, "thread pool size should be huge (was #{opts.thread_pool_size})"
end
end
@ -449,7 +458,7 @@ class TestRakeApplicationOptions < Rake::TestCase
end
@app.instance_eval do
handle_options
collect_tasks
collect_command_line_tasks
end
@tasks = @app.top_level_tasks
@app.options